|
@ -325,8 +325,8 @@ |
|
|
{checkbox: true}, |
|
|
{checkbox: true}, |
|
|
{field: 'index',align: 'center', title: "序号", |
|
|
{field: 'index',align: 'center', title: "序号", |
|
|
formatter: function (value, row, index,column) { |
|
|
formatter: function (value, row, index,column) { |
|
|
return $.table.serialNumber(index) - 1; |
|
|
return $.table.serialNumber(index) - 1; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|
|
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|
|
{title: '料号',field: 'materialCode',align: 'center'}, |
|
|
{title: '料号',field: 'materialCode',align: 'center'}, |
|
@ -846,48 +846,54 @@ |
|
|
$("#form-salesOrder-add").validate({focusCleanup: true}); |
|
|
$("#form-salesOrder-add").validate({focusCleanup: true}); |
|
|
function doSubmit(index, layero,uniqueId){ |
|
|
function doSubmit(index, layero,uniqueId){ |
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections'); |
|
|
//判断是否重复 |
|
|
//判断是否重复 |
|
|
var rows = $("#bootstrap-sub-table-order").bootstrapTable('getData').length; |
|
|
var rows = $("#bootstrap-sub-table-order").bootstrapTable('getData').length; |
|
|
for(var i=0;i<rows;i++){ |
|
|
for(var j=0;i<rows;j++){ |
|
|
var data = $("#bootstrap-sub-table-order").bootstrapTable('getData')[i]; |
|
|
var data = $("#bootstrap-sub-table-order").bootstrapTable('getData'); |
|
|
if(data.materialCode==rowData.materialNo){ |
|
|
for (var i = 0;i<data.length;j++){ |
|
|
$.modal.alertError("不能选择已添加过的相同料号"); |
|
|
if(data[j].materialNo==rowData[j].materialNo){ |
|
|
return; |
|
|
//如果是物料料号的相同,则从rowData清除相同的料号物料 |
|
|
|
|
|
rowData.splice(j,1); |
|
|
|
|
|
$.modal.alertError("不能选择已添加过的相同料号" + rowData[j].materialNo); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
$("#bootstrap-sub-table-order").bootstrapTable('insertRow', { |
|
|
for(var i=0;i<rowData.length;i++) { |
|
|
index:1, |
|
|
$("#bootstrap-sub-table-order").bootstrapTable('insertRow', { |
|
|
row: { |
|
|
index: 1, |
|
|
materialId:rowData.id, |
|
|
row: { |
|
|
materialCode: rowData.materialNo, |
|
|
materialId: rowData[i].id, |
|
|
materialName: rowData.materialName, |
|
|
materialCode: rowData[i].materialNo, |
|
|
materialType: rowData.materialType, |
|
|
materialName: rowData[i].materialName, |
|
|
describe: rowData.describe, |
|
|
materialType: rowData[i].materialType, |
|
|
brand: rowData.brand, |
|
|
describe: rowData[i].describe, |
|
|
unit: rowData.unit, |
|
|
brand: rowData[i].brand, |
|
|
processMethod: rowData.processMethod, |
|
|
unit: rowData[i].unit, |
|
|
photoUrl: rowData.photoUrl, |
|
|
processMethod: rowData[i].processMethod, |
|
|
warehouseDept: rowData.warehouseDept, |
|
|
photoUrl: rowData[i].photoUrl, |
|
|
countTax: $("#taxRate_add").val(), |
|
|
warehouseDept: rowData[i].warehouseDept, |
|
|
usdTax: $("#usdTax_add").val(), |
|
|
countTax: $("#taxRate_add").val(), |
|
|
materialSole: 0, |
|
|
usdTax: $("#usdTax_add").val(), |
|
|
materialNum: "", |
|
|
materialSole: 0, |
|
|
materialNoRmb: 0.00, |
|
|
materialNum: "", |
|
|
materialNoUsd: 0.00, |
|
|
materialNoRmb: 0.00, |
|
|
materialRmb: 0.00, |
|
|
materialNoUsd: 0.00, |
|
|
materialNoRmbSum: 0.00, |
|
|
materialRmb: 0.00, |
|
|
materialRmbSum: 0.00, |
|
|
materialNoRmbSum: 0.00, |
|
|
materialUsd: 0.00, |
|
|
materialRmbSum: 0.00, |
|
|
materialUsdSum: 0.00, |
|
|
materialUsd: 0.00, |
|
|
materialNoUsdSum: 0.00, |
|
|
materialUsdSum: 0.00, |
|
|
createBy: "", |
|
|
materialNoUsdSum: 0.00, |
|
|
createTime: "", |
|
|
createBy: "", |
|
|
updateBy: "", |
|
|
createTime: "", |
|
|
updateTime: "", |
|
|
updateBy: "", |
|
|
remark: "", |
|
|
updateTime: "", |
|
|
} |
|
|
remark: "", |
|
|
}) |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
layer.close(index); |
|
|
layer.close(index); |
|
|
} |
|
|
} |
|
|
function insertRow() { |
|
|
function insertRow() { |
|
|