|
@ -331,6 +331,7 @@ |
|
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
var sysSalesOrder = [[${sysSalesOrder}]]; |
|
|
var sysSalesOrder = [[${sysSalesOrder}]]; |
|
|
|
|
|
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]]; |
|
|
$("#form-salesOrder-edit").validate({focusCleanup: true}); |
|
|
$("#form-salesOrder-edit").validate({focusCleanup: true}); |
|
|
$(function() { |
|
|
$(function() { |
|
|
var options = { |
|
|
var options = { |
|
@ -341,13 +342,15 @@ |
|
|
sidePagination: "client", |
|
|
sidePagination: "client", |
|
|
uniqueId: "index", |
|
|
uniqueId: "index", |
|
|
model: "物料报价信息", |
|
|
model: "物料报价信息", |
|
|
|
|
|
fixedColumns: true, // 启用冻结列 |
|
|
|
|
|
rightFixedColumns:1, |
|
|
|
|
|
fixedRightNumber: 1, // 冻结右列个数 |
|
|
columns: [ |
|
|
columns: [ |
|
|
{checkbox: true}, |
|
|
{checkbox: true}, |
|
|
{field: 'id',title: '主键id',align: 'center',visible: false}, |
|
|
{field: 'id',title: '主键id',align: 'center',visible: false}, |
|
|
{field: 'index',align: 'center', title: "序号", |
|
|
{field: 'materialIndex',title: '序号',align: 'center', |
|
|
formatter: function (value, row, index) { |
|
|
formatter: function(value, row, index) {return index+1; |
|
|
return $.common.serialNumber(value, index); |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{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'}, |
|
@ -375,7 +378,9 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ title: '入库部门',field: 'warehouseDept',align: 'center', |
|
|
{ title: '入库部门',field: 'warehouseDept',align: 'center', |
|
|
formatter: function(value, row, index) {} |
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectDictLabel(warehouseDeptDatas, value); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ title: '对外售价',field: 'materialSole', |
|
|
{ title: '对外售价',field: 'materialSole', |
|
|
editable: { |
|
|
editable: { |
|
@ -473,7 +478,6 @@ |
|
|
return value + "天数"; |
|
|
return value + "天数"; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
{ title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|
|
{ title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|
|
{ title: '录入时间',field: 'createTime',align: 'center',visible: false}, |
|
|
{ title: '录入时间',field: 'createTime',align: 'center',visible: false}, |
|
@ -488,7 +492,7 @@ |
|
|
{title: '操作', align: 'center', |
|
|
{title: '操作', align: 'center', |
|
|
formatter: function (value, row, index) { |
|
|
formatter: function (value, row, index) { |
|
|
var actions = []; |
|
|
var actions = []; |
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialCode + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|
|
return actions.join(''); |
|
|
return actions.join(''); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -644,6 +648,14 @@ |
|
|
if (rmb1== null){ |
|
|
if (rmb1== null){ |
|
|
rmb1 = 0; |
|
|
rmb1 = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
var rows = $("#bootstrap-table-editOrder").bootstrapTable('getData').length; |
|
|
|
|
|
for(var i=0;i<rows;i++){ |
|
|
|
|
|
var data = $("#bootstrap-table-editOrder").bootstrapTable('getData')[i]; |
|
|
|
|
|
if(data.materialCode==rowData.materialNo){ |
|
|
|
|
|
$.modal.alertError("不能选择已添加过的相同料号"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
var rmb = parseFloat(rmb1).toFixed(2) / 100; |
|
|
var rmb = parseFloat(rmb1).toFixed(2) / 100; |
|
|
var usd = $("#usdTax_edit").val()!=null?Number(usd).toFixed(2):0; |
|
|
var usd = $("#usdTax_edit").val()!=null?Number(usd).toFixed(2):0; |
|
|
$("#bootstrap-table-editOrder").bootstrapTable('insertRow', { |
|
|
$("#bootstrap-table-editOrder").bootstrapTable('insertRow', { |
|
@ -688,9 +700,8 @@ |
|
|
} |
|
|
} |
|
|
/* 删除指定表格行 */ |
|
|
/* 删除指定表格行 */ |
|
|
function removeRow(indexs){ |
|
|
function removeRow(indexs){ |
|
|
console.log(indexs); |
|
|
|
|
|
$("#bootstrap-table-editOrder").bootstrapTable('remove', { |
|
|
$("#bootstrap-table-editOrder").bootstrapTable('remove', { |
|
|
field: 'index', |
|
|
field: 'materialCode', |
|
|
values: indexs |
|
|
values: indexs |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|