|
|
@ -109,6 +109,7 @@ |
|
|
|
var salesOrderCode = [[${salesOrderCode}]]; |
|
|
|
var makeNo = [[${makeNo}]]; |
|
|
|
var relatedOrderCode = [[${relatedOrderCode}]]; |
|
|
|
var outOrderCode = [[${outOrderCode}]]; |
|
|
|
|
|
|
|
$("#form-addShippingDevicesOne-edit").validate({ |
|
|
|
focusCleanup: true |
|
|
@ -126,23 +127,34 @@ |
|
|
|
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 |
|
|
|
// var table = $('#table-shippingDevices').bootstrapTable('getData'); |
|
|
|
//获取选中复选框行的数据 |
|
|
|
const selectedRows = $("#table-shippingDevices").bootstrapTable('getSelections'); |
|
|
|
const selectedThisRows = $("#thisSalesOrderShippingDevice-table").bootstrapTable('getSelections'); |
|
|
|
const selectedOtherRows = $("#otherSalesOrderShippingDevice-table").bootstrapTable('getSelections'); |
|
|
|
|
|
|
|
// 将 outOrderCode 添加到 shippingDevicesData 对象中 |
|
|
|
shippingDevicesData.outOrderCode = outOrderCode; |
|
|
|
|
|
|
|
// 检查表格数据是否为空 |
|
|
|
if (selectedRows.length===0){ |
|
|
|
$.modal.alertWarning("请至少选择一条出货设备信息后再保存!"); |
|
|
|
if (selectedThisRows.length + selectedOtherRows.length === 0) { |
|
|
|
$.modal.alertWarning("请至少选择一条出货设备后再保存!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
// 将表数据转换成与complaintNoticeData格式一致的数组 |
|
|
|
var equipDetailDataList = selectedRows.map(function(item) { |
|
|
|
// 根据实际字段名调整 |
|
|
|
return { |
|
|
|
// 将表数据转换成一致的数组 |
|
|
|
const equipDetailDataList = [ |
|
|
|
...selectedThisRows.map(item => ({ |
|
|
|
"shippingDeviceId": item.shippingDeviceId, |
|
|
|
"deviceModelCode": item.deviceModelCode, |
|
|
|
"deviceRunningNumber": item.deviceRunningNumber, |
|
|
|
"makePhotoUrl": item.makePhotoUrl |
|
|
|
// ...其他字段 |
|
|
|
})), |
|
|
|
...selectedOtherRows.map(item => ({ |
|
|
|
"shippingDeviceId": item.shippingDeviceId, |
|
|
|
"deviceModelCode": item.deviceModelCode, |
|
|
|
"deviceRunningNumber": item.deviceRunningNumber, |
|
|
|
"makePhotoUrl": item.makePhotoUrl |
|
|
|
// ...其他字段 |
|
|
|
}; |
|
|
|
}); |
|
|
|
})) |
|
|
|
]; |
|
|
|
|
|
|
|
// 合并表单数据和表格数据 |
|
|
|
const combinedData = Object.assign({}, shippingDevicesData, { selectShippingDeviceVOList: equipDetailDataList }); |
|
|
@ -166,69 +178,6 @@ |
|
|
|
minView: "month", |
|
|
|
autoclose: true |
|
|
|
}); |
|
|
|
// |
|
|
|
// /*物料信息列表*/ |
|
|
|
// $(function() { |
|
|
|
// // 物料信息 |
|
|
|
// $('#table-material').bootstrapTable('destroy'); |
|
|
|
// var materialOptions = { |
|
|
|
// id:"table-material", |
|
|
|
// url: prefix + "/addShippingDevicesMaterial", |
|
|
|
// modalName: "物料信息", |
|
|
|
// showColumns: false, |
|
|
|
// pagination: false, |
|
|
|
// showToggle: false, |
|
|
|
// showRefresh:false, |
|
|
|
// showSearch:false, |
|
|
|
// queryParams:queryParams, |
|
|
|
// columns: [{ |
|
|
|
// checkbox: true |
|
|
|
// }, |
|
|
|
// { title:'销售订单号', |
|
|
|
// field:'quoteId', |
|
|
|
// visible: false |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '料号', |
|
|
|
// field: 'materialCode', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '图片', |
|
|
|
// field: 'photoUrl', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '物料名称', |
|
|
|
// field: 'materialName', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '物料类型', |
|
|
|
// field: 'materialType', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '单位', |
|
|
|
// field: 'materialUnit', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '品牌', |
|
|
|
// field: 'brand', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// title: '描述', |
|
|
|
// field: 'describe', |
|
|
|
// }, |
|
|
|
// ] |
|
|
|
// }; |
|
|
|
// $.table.init(materialOptions); |
|
|
|
// |
|
|
|
// }) |
|
|
|
// function queryParams(params) { |
|
|
|
// var curParams = { |
|
|
|
// // 传递参数查询参数 |
|
|
|
// quoteId: selectMaterialsVO.quoteId, |
|
|
|
// materialCode: selectMaterialsVO.materialCode, |
|
|
|
// }; |
|
|
|
// return curParams; |
|
|
|
// } |
|
|
|
|
|
|
|
//销售订单的出货设备 |
|
|
|
$(function(){ |
|
|
@ -243,8 +192,15 @@ |
|
|
|
showColumns: false, |
|
|
|
queryParams:thisQueryParams, |
|
|
|
sidePagination: "client", |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
|
columns: [ { |
|
|
|
checkbox : true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
if(row.addShippingDeviceFlag === "0"){//如果已经操作禁止选择 |
|
|
|
return { disabled : true,} |
|
|
|
}else{ |
|
|
|
return { disabled : false,} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'equipmentIndex', |
|
|
@ -275,6 +231,12 @@ |
|
|
|
align: 'center', |
|
|
|
title: '生产图片', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'addShippingDeviceFlag', |
|
|
|
align: 'center', |
|
|
|
title: '是否添加出货设备', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
}; |
|
|
@ -288,7 +250,8 @@ |
|
|
|
materialNo: aftersalesOutOrderDetail.materialNo, |
|
|
|
salesOrderCode:salesOrderCode, |
|
|
|
makeNo:makeNo, |
|
|
|
relatedOrderCode:relatedOrderCode |
|
|
|
relatedOrderCode:relatedOrderCode, |
|
|
|
outOrderCode:outOrderCode |
|
|
|
}; |
|
|
|
return curParams; |
|
|
|
} |
|
|
@ -299,9 +262,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//其他销售订单的出货设备 |
|
|
|
$(function(){ |
|
|
|
|
|
|
|
$(function () { |
|
|
|
var options = { |
|
|
|
id: "otherSalesOrderShippingDevice-table", |
|
|
|
url: prefix + "/getOtherSalesOrderShippingDevices", |
|
|
@ -310,46 +271,53 @@ |
|
|
|
showRefresh: false, |
|
|
|
showToggle: false, |
|
|
|
showColumns: false, |
|
|
|
queryParams:otherQueryParams, |
|
|
|
queryParams: otherQueryParams, |
|
|
|
sidePagination: "client", |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
|
}, |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
field: 'equipmentIndex', |
|
|
|
align: 'center', |
|
|
|
title: "序号", |
|
|
|
formatter: function (value, row, index) { |
|
|
|
// 使用bootstrap-table的内置序号生成 |
|
|
|
return index + 1; |
|
|
|
checkbox : true, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
if(row.addShippingDeviceFlag === "0"){//如果已经操作禁止选择 |
|
|
|
return { disabled : true,} |
|
|
|
}else{ |
|
|
|
return { disabled : false,} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'shippingDeviceId', |
|
|
|
align: 'center', |
|
|
|
title: '出货设备id', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'deviceModelCode', |
|
|
|
align: 'center', |
|
|
|
title: '设备型号', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'deviceRunningNumber', |
|
|
|
align: 'center', |
|
|
|
title: '追踪码', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'makePhotoUrl', |
|
|
|
align: 'center', |
|
|
|
title: '生产图片', |
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
field: 'equipmentIndex', |
|
|
|
align: 'center', |
|
|
|
title: "序号", |
|
|
|
formatter: function (value, row, index) { |
|
|
|
// 使用bootstrap-table的内置序号生成 |
|
|
|
return index + 1; |
|
|
|
} |
|
|
|
}, { |
|
|
|
field: 'shippingDeviceId', |
|
|
|
align: 'center', |
|
|
|
title: '出货设备id', |
|
|
|
}, { |
|
|
|
field: 'deviceModelCode', |
|
|
|
align: 'center', |
|
|
|
title: '设备型号', |
|
|
|
}, { |
|
|
|
field: 'deviceRunningNumber', |
|
|
|
align: 'center', |
|
|
|
title: '追踪码', |
|
|
|
}, { |
|
|
|
field: 'makePhotoUrl', |
|
|
|
align: 'center', |
|
|
|
title: '生产图片', |
|
|
|
}, { |
|
|
|
field: 'addShippingDeviceFlag', |
|
|
|
align: 'center', |
|
|
|
title: '是否添加出货设备', |
|
|
|
visible: false |
|
|
|
}] |
|
|
|
}; |
|
|
|
$.table.init(options); |
|
|
|
|
|
|
|
}) |
|
|
|
$.table.init(options); |
|
|
|
}); |
|
|
|
|
|
|
|
function otherQueryParams(params) { |
|
|
|
var curParams = { |
|
|
@ -357,7 +325,8 @@ |
|
|
|
materialNo: aftersalesOutOrderDetail.materialNo, |
|
|
|
salesOrderCode:salesOrderCode, |
|
|
|
makeNo:makeNo, |
|
|
|
relatedOrderCode:relatedOrderCode |
|
|
|
relatedOrderCode:relatedOrderCode, |
|
|
|
outOrderCode:outOrderCode |
|
|
|
}; |
|
|
|
return curParams; |
|
|
|
} |
|
|
|