@ -52,7 +52,7 @@
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getTypeSelect ('bomLevel')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var subTableFormArray = [];
@ -85,13 +85,18 @@
title: '主键id',
visible: false
},
{
field: 'quoteId',
title: '关联销售订单编号',
visible: false
},
{
field: 'bomId',
title: 'bom主键Id',
visible: false
},
{
field: 'materialNo ',
field: 'materialCode ',
align: 'center',
title: '料号'
},
@ -155,7 +160,7 @@
var childTableId = 'child_table_'+index;
var childFormTableId = 'child_form_table_'+index;
var childTableFormId = 'child_table_form_'+index;
$detail.html('< table id = "'+childTableId+'" > < / table > < form id = "'+childTableForm Id+'" > < table id = "'+childFormTableId+'" > < / table > < / form > ');
$detail.html('< h1 > 123< / h1 > < div > < form id = "'+childTableFormId+'" > < table id = "'+childTableId+'" > < / table > < table id = "'+childFormTableId+'" > < / table > < / form > < / div > ');
// BOM展示
$('#'+childTableId).bootstrapTable({
url: ctx + "erp/bom/allLevelList",
@ -163,7 +168,7 @@
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
parentId: row.bomId
parentId: pa rentR ow.bomId
},
columns: [{
field: 'id',
@ -291,11 +296,7 @@
field: 'materialNum',
title: '订单用量',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return parentRow.materialNum * value;
}
return parentRow.materialNum * row.useNum;
}
},
{
@ -320,8 +321,8 @@
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
makeNo: row.makeNo ,
materialNo: row.materialNo
makeNo: $("#makeNo").val() ,
materialNo: parentRow.materialCode
},
columns: [
{
@ -381,7 +382,7 @@
'< span class = "input-group-addon" > -< / span > \n' +
'< input type = "text" class = "form-control" data-id = "'+endDateName+'" name = "orderDepts['+parentRowIndex+'].planFinishEndDate" placeholder = "结束时间" / > < / div > '
}else{
html = '< input class = "form-control" data-id = "planFinishDays_'+parentRowIndex+'" name = "orderDepts['+parentRowIndex+'].planFinishDays" value = "'+value +'" > < / input > ';
html = '< input class = "form-control" data-id = "planFinishDays_'+parentRowIndex+'" name = "orderDepts['+parentRowIndex+'].planFinishDays" value = "'+row.planFinishDays +'" > < / input > ';
}
return html;
}
@ -469,20 +470,24 @@
});
function submitHandler() {
var data = $('#bootstrap-sub-table-1').bootstrapTable('getData');
var count = data.length;
var allFormData;
for (let i = 0; i < count ; i + + ) {
var childTableFormId = 'child_table_form_'+i;
if($("#"+childTableFormId).length>0){
if(i==0){
allFormData = $("#"+childTableFormId).serialize();
}else{
allFormData = allFormData +'& '+ $("#"+childTableFormId).serialize();
}
}
}
$.operate.save(prefix + "/deptReview", allFormData);
debugger
var data = $("#form-makeorder-edit").serializeArray();
alert(JSON.stringify(data))
$.operate.saveModal(prefix + "/deptReview", data);
// var data = $('#bootstrap-sub-table-1').bootstrapTable('getData');
// var count = data.length;
// var allFormData;
// for (let i = 0; i < count ; i + + ) {
// var childTableFormId = 'child_table_form_'+i;
// if($("#"+childTableFormId).length>0){
// if(i==0){
// allFormData = $("#"+childTableFormId).serialize();
// }else{
// allFormData = allFormData +'& '+ $("#"+childTableFormId).serialize();
// }
// }
// }
// $.operate.save(prefix + "/deptReview", allFormData);
}
< / script >