修改单据明细的展示逻辑

This commit is contained in:
季圣华
2020-10-12 00:16:23 +08:00
parent 3534c26ae3
commit e06435ecc8
16 changed files with 380 additions and 452 deletions

View File

@@ -454,8 +454,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -468,16 +466,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -518,7 +518,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -623,6 +626,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -451,8 +451,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '商品类型',field: 'MType',editor:'validatebox',width:80},
@@ -466,16 +464,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -516,7 +516,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -607,6 +610,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -452,8 +452,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '商品类型',field: 'MType',editor:'validatebox',width:80},
@@ -467,16 +465,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -517,7 +517,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -608,6 +611,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -464,8 +464,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -478,16 +476,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -528,7 +528,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -619,6 +622,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -457,8 +457,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -471,16 +469,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -521,7 +521,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -612,6 +615,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -595,8 +595,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -609,16 +607,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -659,7 +659,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -754,6 +757,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -613,8 +613,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -627,16 +625,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -677,7 +677,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -772,6 +775,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -551,8 +551,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -565,16 +563,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -615,11 +615,14 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
inOutService.materialSelect(rowData,monthTime);
inOutService.materialSelect(rowData, monthTime);
}
}
}
@@ -710,6 +713,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -612,8 +612,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -626,16 +624,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -676,7 +676,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -767,6 +770,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -648,8 +648,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -662,16 +660,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -712,7 +712,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -803,6 +806,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -636,8 +636,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -650,16 +648,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -700,7 +700,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -795,6 +798,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -595,8 +595,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -609,16 +607,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -659,7 +659,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -754,6 +757,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},

View File

@@ -672,8 +672,6 @@
//交替出现背景
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
onClickRow: onClickRow,
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
@@ -686,16 +684,18 @@
valueField: 'id',
textField: 'depotName',
method: 'get',
hasDownArrow: false,
url: '/depot/findDepotByUserId?UBType=UserDepot&UBKeyId='+kid,
onSelect:function(rec){
var depotId = rec.id;
body =$("#depotHeadFM .datagrid-body");
footer =$("#depotHeadFM .datagrid-footer");
input = ".datagrid-editable-input";
var mId = body.find("[field='MaterialExtendId']").find(".textbox-value").val();
body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
if(mId){
var type = "select"; //type 类型:点击 click选择 select
inOutService.findStockNumById(depotId, mId, monthTime, body, input, ratioDepot, type);
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
}
}
}
@@ -736,7 +736,10 @@
onLoadSuccess: function (rec) {
if(rec && rec.total==1) {
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
$("#depotHeadFM .datagrid-body").find("[field='OperNumber']").find(".datagrid-editable-input").focus().select();
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
input = "input[type=text]";
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
}
},
onSelect:function(index, rowData){
@@ -831,6 +834,11 @@
$("#materialData").datagrid('loadData',data);
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},