Browse Source
委外加工 委外领料 修改添加、编辑、委外领料列表、经理、主管审批页面; 新增委外领料详情、驳回调整页面; 修改委外领料实体类、详情、vo类; 修改委外领料controller、service、mapper文件;dev
15 changed files with 2064 additions and 386 deletions
@ -0,0 +1,267 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('委外领料单详情')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: bootstrap-editable-css" /> |
|||
</head> |
|||
<style> |
|||
.col-sm-12.material-table{ |
|||
height: 75px; |
|||
} |
|||
.hr-line-dashed { |
|||
border-top: 1px dashed #ddd; |
|||
margin-top: 20px; /* 调整间距 */ |
|||
border-bottom: 1px dashed #ddd; |
|||
margin-bottom: 20px; |
|||
} |
|||
|
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-order-outsourceRequisition-edit" th:object="${outsourceRequisition}"> |
|||
<input name="outsourceRequisitionId" id="outsourceRequisitionId" th:field="*{outsourceRequisitionId}" type="hidden"> |
|||
<div class="container" id="material"> |
|||
</div> |
|||
</form> |
|||
<!-- 订单合计--> |
|||
<div class="container"> |
|||
<div class="row"><h4 class="card-header">订单合计:</h4></div> |
|||
<div class="col-xs-12"> |
|||
<div class="col-sm-6"> |
|||
<label for="materialAmount" class="col-sm-4 col-form-label">物料合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="materialAmount" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<label for="totalAmount" class="col-sm-4 col-form-label">领料数量合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="totalAmount" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/outsource_requisition"; |
|||
$("#form-order-outsourceRequisition-edit").validate({focusCleanup: true}); |
|||
var outsourcePlanDetailList = []; |
|||
// var chargeUnitDatas = [[${@dict.getType("charge_unit")}]] |
|||
// var formId = "form-plan-outsourceOrder-add"; |
|||
var outsourcePlanCode = ''; |
|||
var materialList = []; |
|||
var tableIdList = []; |
|||
var $processContent; |
|||
var $supplierheaderContent; |
|||
var materials; |
|||
var outsourceProcessAmount = 0; |
|||
var actualOutsourceAmount = 0; |
|||
var outsourceRequisition = [[${outsourceRequisition}]]; |
|||
var originMaterial = [] |
|||
|
|||
$(function() { |
|||
originMaterial = outsourceRequisition.outsourceRequisitionDetailList; |
|||
materials = mergeRecords(originMaterial); |
|||
$("#totalAmount").val(outsourceRequisition.totalAmount); |
|||
|
|||
// 遍历委外计划详情信息 |
|||
materials.forEach(function (material, index) { |
|||
var tableId = 'materialNo-' + (index+1); |
|||
|
|||
var materialTable = "bootstrap-table_" + tableId; |
|||
tableIdList.push(materialTable); |
|||
// 创建物料信息的容器 |
|||
var $tableWrapper = $('<div id="material-' + tableId + '"></div>'); |
|||
// 将整个物料信息容器添加到页面 |
|||
$('#material').append($tableWrapper); |
|||
// 添加关联销售订单号信息 |
|||
var $headerDiv = |
|||
$('<div class="row">' + |
|||
'<div class="col-xs-12" >' + |
|||
'<h3>' + |
|||
'<span><strong>物料 ' + (index+1) + ': </strong> ' + '<strong>关联订单号: </strong></span>' + '<span class="correlationCodes" style="color: blue" id="correlationCodes-' + tableId + '"></span>' + |
|||
'</h3>' + |
|||
'<div class="col-sm-12 material-table">' + |
|||
'<table class="table-materialNo" id="' + materialTable + '">' + '</table>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($headerDiv); |
|||
|
|||
$(".correlationCodes").text(material.correlationCodes); |
|||
$("#materialAmount").val(materials.length); |
|||
|
|||
// console.log(outsourceOrderList[0].outsourceOrderNo); |
|||
var materialObj = { |
|||
outsourceRequisitionNo: material.outsourceRequisitionNo, |
|||
materialNo: material.materialNo, |
|||
materialPhotourl: material.materialPhotourl, |
|||
materialName: material.materialName, |
|||
materialType: material.materialType, |
|||
description: material.description, |
|||
unit: material.unit, |
|||
brand: material.brand, |
|||
processMethod: material.processMethod, |
|||
correlationCodes: material.correlationCodes, |
|||
actualOutsourceAmount: material.actualOutsourceAmount, |
|||
plannedOutsourceAmount: material.plannedOutsourceAmount, |
|||
alreadyRequisitionAmount: material.takenMaterial, |
|||
nowRequisitionAmount: material.takingMaterial, |
|||
}; |
|||
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源 |
|||
materialList.push(material); |
|||
tables(materialTable, materialData); |
|||
|
|||
var $MaterialNumDiv = |
|||
$('<div class="row" style="margin-top: 20px;margin-left: 10px;">' + |
|||
'<div class="col-xs-12">' + |
|||
'<h3>' + |
|||
'<span><strong>供应商</strong></span>' + |
|||
'</h3>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($MaterialNumDiv); |
|||
|
|||
var $processInfo = $('<div class="process-card" style="height: 60px;" id="processInfo-' + tableId + '"></div>'); |
|||
|
|||
if(material.processList.length <= 0){ |
|||
var $noProcessDiv = $('<div class="no-process">暂无委外工序信息,请先添加委外工序信息。</div>'); |
|||
$tableWrapper.append($noProcessDiv); |
|||
}else{ |
|||
material.processList.forEach(function(detail, detailsIndex) { |
|||
// console.log(processIndex); |
|||
var processSelectId = 'process-select-' + tableId + '_' + (detailsIndex+1); |
|||
var processTableId = 'process-' + tableId + '_' + (detailsIndex+1); |
|||
|
|||
$processContent = |
|||
$('<div class="card-header process_card" id="process-' + tableId + '_' + (detailsIndex+1) + '" >' + |
|||
'<div class="row" style="margin-left: 25px;height: 20px">' + |
|||
'<div class="card-text">' + |
|||
'<h5>委外工序 ' + (detailsIndex+1) + ':' + |
|||
'<span style="color: blue" class="outsourceProcessInfo">' + detail.outsourceProcessInfo + '</span>' + |
|||
'</h5>' + |
|||
'</div>' + |
|||
'<div class="col-xs-12" style="padding-left: 0px;">' + |
|||
'<div class="col-sm-12" style="padding-left: 0px;" id="chargeUnit-'+processSelectId+'">' + |
|||
'<span class="chargeUnit" style="padding-right: 10px;">*计价单位:</span>' + |
|||
'<span class="chargeUnitInfo" style="padding-right: 80px;">' + detail.chargeUnitInfo + '</span>' + |
|||
'<span class="singleMaterial" style="padding-right: 10px;">每个物料:</span>' + |
|||
'<span class="singleMaterialInfo">' + detail.singleMaterialInfo + '</span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
|
|||
$tableWrapper.append($processContent); |
|||
$supplierheaderContent = |
|||
$('<div class="card-header suppplier_card" id = "supplier-' + processTableId + '_' + ' ">' + |
|||
'<div class="col-xs-12">' + |
|||
'<div class="col-sm-4" style="margin-top: 13px;padding-left: 10px;">' + |
|||
'<input type="radio" id="supplier-' + processTableId + '" name="supplier-' + processTableId + '" value="" checked>' + |
|||
'<span class="supplierInfo">' + detail.supplierInfo + '</span>' + |
|||
|
|||
'</div>' + |
|||
'<div class="col-sm-8 deliveryTime-'+processTableId+'" style="padding-top: 10px;padding-left: 0px;">' + |
|||
'<label class="col-sm-2" style="padding-left: 0px;margin-top: 5px;">计划交付时间: </label>' + |
|||
'<div class ="col-sm-4">' + |
|||
'<div class="input-group date"> ' + |
|||
'<input type="text" disabled name="deliveryTime" value="' + detail.deliveryTimeInfo + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + processTableId + '">' + |
|||
'<span class="input-group-addon"><i class="fa fa-calendar"></i></span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'+ |
|||
|
|||
'</div>' + |
|||
'</div>'+ |
|||
'<div class="row">' + |
|||
'<div class="hr-line-dashed" style="margin-bottom: 0px;margin-top: 80px;">' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$("#"+processTableId).append($supplierheaderContent); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
function tables(tableId, data) { |
|||
$('#' + tableId).bootstrapTable({ |
|||
showExport: false, |
|||
showFooter: false, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showColumns: false, |
|||
showToggle: false, |
|||
data: data, |
|||
columns: [ |
|||
{title: '料号', field: 'materialNo'}, |
|||
{title: '图片', field: 'materialPhotourl', formatter: function (value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{title: '物料名称', field: 'materialName'}, |
|||
{title: '物料描述', field: 'description'}, |
|||
{title: '品牌', field: 'brand'}, |
|||
{title: '单位', field: 'unit', align: 'center', }, |
|||
{title: '加工方式', field: 'processMethod', align: 'center',}, |
|||
{title: '计划委外数', field: 'plannedOutsourceAmount'}, |
|||
{title: '实际委外数', field: 'actualOutsourceAmount'}, |
|||
{title: '已委外领料数', field: 'alreadyRequisitionAmount'}, |
|||
{title: '本次领料数', field: 'nowRequisitionAmount', |
|||
}, |
|||
], |
|||
}); |
|||
} |
|||
// 函数用于合并重复的material的记录 |
|||
function mergeRecords(items) { |
|||
return items.reduce((merged, current) => { |
|||
const existingRecord = merged.find(record => record.materialNo === current.materialNo); |
|||
if (existingRecord) { |
|||
if (!existingRecord.processList) { |
|||
existingRecord.processList = []; |
|||
} |
|||
existingRecord.processList.push({ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}); |
|||
} else { |
|||
merged.push({ |
|||
outsourceRequisitionNo: current.outsourceRequisitionNo, |
|||
materialNo: current.materialNo, |
|||
materialPhotourl: current.materialPhotourl, |
|||
materialName: current.materialName, |
|||
materialType: current.materialType, |
|||
description: current.description, |
|||
unit: current.unit, |
|||
brand: current.brand, |
|||
processMethod: current.processMethod, |
|||
correlationCodes: current.correlationCodes, |
|||
plannedOutsourceAmount: current.plannedOutsourceAmount, |
|||
actualOutsourceAmount: current.actualOutsourceAmount, |
|||
takenMaterial: current.takenMaterial, |
|||
takingMaterial: current.takingMaterial, |
|||
processList:[{ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}], |
|||
}); |
|||
} |
|||
return merged; |
|||
}, []); |
|||
}; |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,151 +1,364 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改委外领料')" /> |
|||
<th:block th:include="include :: header('修改委外领料单')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: bootstrap-editable-css" /> |
|||
</head> |
|||
<style> |
|||
.col-sm-12.material-table{ |
|||
height: 75px; |
|||
} |
|||
.hr-line-dashed { |
|||
border-top: 1px dashed #ddd; |
|||
margin-top: 20px; /* 调整间距 */ |
|||
border-bottom: 1px dashed #ddd; |
|||
margin-bottom: 20px; |
|||
} |
|||
.is-required { |
|||
position: relative; |
|||
padding-left: 5px; /* 为星号留出空间 */ |
|||
} |
|||
|
|||
.is-required::before { |
|||
content: '*'; |
|||
font-weight: bold; |
|||
color: red; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
} |
|||
|
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-outsource_requisition-edit" th:object="${outsourceRequisition}"> |
|||
<h4 class="form-header h4">委外领料信息</h4> |
|||
<input name="outsourceRequisitionId" th:field="*{outsourceRequisitionId}" type="hidden"> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外领料编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceRequisitionNo" th:field="*{outsourceRequisitionNo}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外订单编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceOrderNo" th:field="*{outsourceOrderNo}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">领料员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="requisitionPerson" th:field="*{requisitionPerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料合计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialAmount" th:field="*{materialAmount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-order-outsourceRequisition-edit" th:object="${outsourceRequisition}"> |
|||
<input name="outsourceRequisitionId" id="outsourceRequisitionId" th:field="*{outsourceRequisitionId}" type="hidden"> |
|||
<div class="container" id="material"> |
|||
</div> |
|||
</form> |
|||
<!-- 订单合计--> |
|||
<div class="container"> |
|||
<div class="row"><h4 class="card-header">订单合计:</h4></div> |
|||
<div class="col-xs-12"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">数量总计:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="totalAmount" th:field="*{totalAmount}" class="form-control" type="text"> |
|||
<div class="col-sm-6"> |
|||
<label for="materialAmount" class="col-sm-4 col-form-label">物料合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="materialAmount" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<label for="totalAmount" class="col-sm-4 col-form-label">领料数量合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="totalAmount" disabled> |
|||
</div> |
|||
<h4 class="form-header h4">委外领料详情信息</h4> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button> |
|||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
|
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/outsource_requisition"; |
|||
$("#form-outsource_requisition-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
$("#form-order-outsourceRequisition-edit").validate({focusCleanup: true}); |
|||
var outsourcePlanDetailList = []; |
|||
// var chargeUnitDatas = [[${@dict.getType("charge_unit")}]] |
|||
// var formId = "form-plan-outsourceOrder-add"; |
|||
var outsourcePlanCode = ''; |
|||
var materialList = []; |
|||
var tableIdList = []; |
|||
var $processContent; |
|||
var $supplierheaderContent; |
|||
var materials; |
|||
var outsourceProcessAmount = 0; |
|||
var actualOutsourceAmount = 0; |
|||
var outsourceRequisition = [[${outsourceRequisition}]]; |
|||
var outsourceRequisitionNo = [[${outsourceRequisition.outsourceRequisitionNo}]]; |
|||
var originMaterial = [] |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-outsource_requisition-edit').serialize()); |
|||
} |
|||
$(function() { |
|||
originMaterial = outsourceRequisition.outsourceRequisitionDetailList; |
|||
materials = mergeRecords(originMaterial); |
|||
$("#totalAmount").val(outsourceRequisition.totalAmount); |
|||
|
|||
console.log(materials); |
|||
|
|||
// 遍历委外计划详情信息 |
|||
materials.forEach(function (material, index) { |
|||
var tableId = 'materialNo-' + (index+1); |
|||
|
|||
var materialTable = "bootstrap-table_" + tableId; |
|||
tableIdList.push(materialTable); |
|||
// 创建物料信息的容器 |
|||
var $tableWrapper = $('<div id="material-' + tableId + '"></div>'); |
|||
// 将整个物料信息容器添加到页面 |
|||
$('#material').append($tableWrapper); |
|||
// 添加关联销售订单号信息 |
|||
var $headerDiv = |
|||
$('<div class="row">' + |
|||
'<div class="col-xs-12" >' + |
|||
'<h3>' + |
|||
'<span><strong>物料 ' + (index+1) + ': </strong> ' + '<strong>关联订单号: </strong></span>' + '<span class="correlationCodes" style="color: blue" id="correlationCodes-' + tableId + '"></span>' + |
|||
'</h3>' + |
|||
'<div class="col-sm-12 material-table">' + |
|||
'<table class="table-materialNo" id="' + materialTable + '">' + '</table>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($headerDiv); |
|||
|
|||
$(".correlationCodes").text(material.correlationCodes); |
|||
$("#materialAmount").val(materials.length); |
|||
|
|||
// console.log(outsourceOrderList[0].outsourceOrderNo); |
|||
var materialObj = { |
|||
outsourceRequisitionNo: material.outsourceRequisitionNo, |
|||
materialNo: material.materialNo, |
|||
materialPhotourl: material.materialPhotourl, |
|||
materialName: material.materialName, |
|||
materialType: material.materialType, |
|||
description: material.description, |
|||
unit: material.unit, |
|||
brand: material.brand, |
|||
processMethod: material.processMethod, |
|||
correlationCodes: material.correlationCodes, |
|||
actualOutsourceAmount: material.actualOutsourceAmount, |
|||
plannedOutsourceAmount: material.plannedOutsourceAmount, |
|||
alreadyRequisitionAmount: material.takenMaterial, |
|||
nowRequisitionAmount: material.takingMaterial, |
|||
}; |
|||
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源 |
|||
materialList.push(material); |
|||
tables(materialTable, materialData); |
|||
|
|||
var $MaterialNumDiv = |
|||
$('<div class="row" style="margin-top: 20px;margin-left: 10px;">' + |
|||
'<div class="col-xs-12">' + |
|||
'<h3>' + |
|||
'<span><strong>供应商</strong></span>' + |
|||
'</h3>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($MaterialNumDiv); |
|||
|
|||
var $processInfo = $('<div class="process-card" style="height: 60px;" id="processInfo-' + tableId + '"></div>'); |
|||
|
|||
if(material.processList.length <= 0){ |
|||
var $noProcessDiv = $('<div class="no-process">暂无委外工序信息,请先添加委外工序信息。</div>'); |
|||
$tableWrapper.append($noProcessDiv); |
|||
}else{ |
|||
material.processList.forEach(function(detail, detailsIndex) { |
|||
// console.log(processIndex); |
|||
var processSelectId = 'process-select-' + tableId + '_' + (detailsIndex+1); |
|||
var processTableId = 'process-' + tableId + '_' + (detailsIndex+1); |
|||
|
|||
$processContent = |
|||
$('<div class="card-header process_card" id="process-' + tableId + '_' + (detailsIndex+1) + '" >' + |
|||
'<div class="row" style="margin-left: 25px;height: 20px">' + |
|||
'<div class="card-text">' + |
|||
'<h5>委外工序 ' + (detailsIndex+1) + ':' + |
|||
'<span style="color: blue" class="outsourceProcessInfo">' + detail.outsourceProcessInfo + '</span>' + |
|||
'</h5>' + |
|||
'</div>' + |
|||
'<div class="col-xs-12" style="padding-left: 0px;">' + |
|||
'<div class="col-sm-12" style="padding-left: 0px;" id="chargeUnit-'+processSelectId+'">' + |
|||
'<span class="chargeUnit" style="padding-right: 10px;">*计价单位:</span>' + |
|||
'<span class="chargeUnitInfo" style="padding-right: 80px;">' + detail.chargeUnitInfo + '</span>' + |
|||
'<span class="singleMaterial" style="padding-right: 10px;">每个物料:</span>' + |
|||
'<span class="singleMaterialInfo">' + detail.singleMaterialInfo + '</span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
|
|||
$tableWrapper.append($processContent); |
|||
$supplierheaderContent = |
|||
$('<div class="card-header suppplier_card" id = "supplier-' + processTableId + '_' + ' ">' + |
|||
'<div class="col-xs-12">' + |
|||
'<div class="col-sm-4" style="margin-top: 13px;padding-left: 10px;">' + |
|||
'<input type="radio" id="supplier-' + processTableId + '" name="supplier-' + processTableId + '" value="" checked>' + |
|||
'<span class="supplierInfo">' + detail.supplierInfo + '</span>' + |
|||
|
|||
'</div>' + |
|||
'<div class="col-sm-8 deliveryTime-'+processTableId+'" style="padding-top: 10px;padding-left: 0px;">' + |
|||
'<label class="col-sm-2" style="padding-left: 0px;margin-top: 5px;">计划交付时间: </label>' + |
|||
'<div class ="col-sm-4">' + |
|||
'<div class="input-group date"> ' + |
|||
'<input type="text" disabled name="deliveryTime" value="' + detail.deliveryTimeInfo + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + processTableId + '">' + |
|||
'<span class="input-group-addon"><i class="fa fa-calendar"></i></span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'+ |
|||
|
|||
'</div>' + |
|||
'</div>'+ |
|||
'<div class="row">' + |
|||
'<div class="hr-line-dashed" style="margin-bottom: 0px;margin-top: 80px;">' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$("#"+processTableId).append($supplierheaderContent); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
$(function() { |
|||
var options = { |
|||
data: [[${outsourceRequisition.outsourceRequisitionDetailList}]], |
|||
pagination: false, |
|||
function tables(tableId, data) { |
|||
$('#' + tableId).bootstrapTable({ |
|||
showExport: false, |
|||
showFooter: false, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
sidePagination: "client", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'index', |
|||
align: 'center', |
|||
title: "序号", |
|||
formatter: function (value, row, index) { |
|||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index)); |
|||
return columnIndex + $.table.serialNumber(index); |
|||
showToggle: false, |
|||
data: data, |
|||
columns: [ |
|||
{title: '料号', field: 'materialNo'}, |
|||
{title: '图片', field: 'materialPhotourl', formatter: function (value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'materialNo', |
|||
align: 'center', |
|||
title: '料号', |
|||
{title: '物料名称', field: 'materialName'}, |
|||
{title: '物料描述', field: 'description'}, |
|||
{title: '品牌', field: 'brand'}, |
|||
{title: '单位', field: 'unit', align: 'center', }, |
|||
{title: '加工方式', field: 'processMethod', align: 'center',}, |
|||
{title: '计划委外数', field: 'plannedOutsourceAmount'}, |
|||
{title: '实际委外数', field: 'actualOutsourceAmount'}, |
|||
{title: '已委外领料数', field: 'alreadyRequisitionAmount'}, |
|||
{title: '本次领料数', field: 'nowRequisitionAmount', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].materialNo' value='%s'>", index, value); |
|||
var html = $.common.sprintf("<input class='form-control' type='number' name='nowRequisitionAmount' id = 'nowRequisitionAmount_"+tableId+"' value='"+data[index].nowRequisitionAmount+"'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
|
|||
{ |
|||
field: 'takenMaterial', |
|||
align: 'center', |
|||
title: '已委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takenMaterial' value='%s'>", index, value); |
|||
return html; |
|||
], |
|||
}); |
|||
$('input[name="nowRequisitionAmount"]').on('input', function() { |
|||
calculateTotal(); |
|||
}); |
|||
} |
|||
}, |
|||
// 计算总领料数 |
|||
function calculateTotal() { |
|||
var inputs = $('input[name="nowRequisitionAmount"]'); |
|||
var total = 0; |
|||
|
|||
{ |
|||
field: 'takingMaterial', |
|||
align: 'center', |
|||
title: '本次委外领料数', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='text' name='outsourceRequisitionDetailList[%s].takingMaterial' value='%s'>", index, value); |
|||
return html; |
|||
inputs.each(function() { |
|||
var value = parseFloat($(this).val()) || 0; // 将输入框的值转换为数字,默认为0 |
|||
total += value; |
|||
}); |
|||
// console.log("总领料数:" + total); |
|||
$("#totalAmount").val(total); |
|||
}; |
|||
// 函数用于合并重复的material的记录 |
|||
function mergeRecords(items) { |
|||
return items.reduce((merged, current) => { |
|||
const existingRecord = merged.find(record => record.materialNo === current.materialNo); |
|||
if (existingRecord) { |
|||
if (!existingRecord.processList) { |
|||
existingRecord.processList = []; |
|||
} |
|||
}, |
|||
existingRecord.processList.push({ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}); |
|||
} else { |
|||
merged.push({ |
|||
outsourceRequisitionNo: current.outsourceRequisitionNo, |
|||
materialNo: current.materialNo, |
|||
materialPhotourl: current.materialPhotourl, |
|||
materialName: current.materialName, |
|||
materialType: current.materialType, |
|||
description: current.description, |
|||
unit: current.unit, |
|||
brand: current.brand, |
|||
processMethod: current.processMethod, |
|||
correlationCodes: current.correlationCodes, |
|||
plannedOutsourceAmount: current.plannedOutsourceAmount, |
|||
actualOutsourceAmount: current.actualOutsourceAmount, |
|||
takenMaterial: current.takenMaterial, |
|||
takingMaterial: current.takingMaterial, |
|||
processList:[{ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}], |
|||
}); |
|||
} |
|||
return merged; |
|||
}, []); |
|||
}; |
|||
function submitHandler() { |
|||
var materialAmount = 0; |
|||
var outsourceRequisition = { |
|||
outsourceRequisitionId: $("#outsourceRequisitionId").val(), |
|||
outsourceRequisitionNo: outsourceRequisitionNo, |
|||
materialAmount: 0, |
|||
totalAmount: 0, |
|||
outsourceRequisitionDetailList:[] |
|||
}; |
|||
let requisitionSum = 0; |
|||
var hasError = false; |
|||
var hasValue = false; |
|||
$('.table-materialNo').each(function(index, tableElement) { |
|||
var tableId = tableIdList[index]; |
|||
let materialObj = materialList[index]; |
|||
|
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); |
|||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>'; |
|||
if (typeof materialObj === 'undefined') return; |
|||
var rows = $("#" + tableId).bootstrapTable('getData').length; |
|||
if(rows != 0) { |
|||
var data = $("#" + tableId).bootstrapTable('getData')[0]; |
|||
if($('[id^="nowRequisitionAmount_' + tableId + '"]').val() === ""){ |
|||
var requisitionDetail = { |
|||
outsourceRequisitionNo: outsourceRequisitionNo, |
|||
materialNo: data.materialNo, |
|||
takingMaterial: 0, |
|||
}; |
|||
outsourceRequisition.outsourceRequisitionDetailList.push(requisitionDetail); |
|||
}else{ |
|||
hasValue = true; |
|||
materialAmount++; |
|||
let value = Number($('[id^="nowRequisitionAmount_' + tableId + '"]').val()); |
|||
|
|||
if (!isNaN(value)) { |
|||
var hasReValue = Number(data.alreadyRequisitionAmount); |
|||
if(hasReValue + value>data.actualOutsourceAmount){ |
|||
hasError = true; |
|||
} |
|||
requisitionSum += value; |
|||
} |
|||
}] |
|||
var requisitionDetail = { |
|||
outsourceRequisitionNo: outsourceRequisitionNo, |
|||
materialNo: data.materialNo, |
|||
takingMaterial: value, |
|||
}; |
|||
$.table.init(options); |
|||
outsourceRequisition.outsourceRequisitionDetailList.push(requisitionDetail); |
|||
} |
|||
} |
|||
outsourceRequisition.materialAmount = materialAmount; |
|||
}); |
|||
|
|||
function addRow() { |
|||
var count = $("#" + table.options.id).bootstrapTable('getData').length; |
|||
var row = { |
|||
index: $.table.serialNumber(count), |
|||
materialNo: "", |
|||
takenMaterial: "", |
|||
takingMaterial: "", |
|||
if(!hasValue){ |
|||
$.modal.msgError("领料数不能全为空!"); |
|||
return; |
|||
} |
|||
if(!hasError){ |
|||
console.log(outsourceRequisition); |
|||
outsourceRequisition.totalAmount += requisitionSum; |
|||
$.operate.saveJson(prefix + "/edit",JSON.stringify(outsourceRequisition)); |
|||
}else{ |
|||
$.modal.msgError("累计领料数不能大于实际委外数!"); |
|||
return; |
|||
} |
|||
sub.addRow(row); |
|||
} |
|||
</script> |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,323 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('驳回调整')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: summernote-css" /> |
|||
</head> |
|||
<style> |
|||
.col-sm-12.material-table{ |
|||
height: 75px; |
|||
} |
|||
.hr-line-dashed { |
|||
border-top: 1px dashed #ddd; |
|||
margin-top: 20px; /* 调整间距 */ |
|||
border-bottom: 1px dashed #ddd; |
|||
margin-bottom: 20px; |
|||
} |
|||
.is-required { |
|||
position: relative; |
|||
padding-left: 5px; /* 为星号留出空间 */ |
|||
} |
|||
|
|||
.is-required::before { |
|||
content: '*'; |
|||
font-weight: bold; |
|||
color: red; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
} |
|||
|
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-outsourceRequisition-edit" th:object="${formData}"> |
|||
<input name="outsourceRequisitionId" id="outsourceRequisitionId" th:field="*{outsourceRequisitionId}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">委外领料单号:</label> |
|||
<div class="col-sm-6"> |
|||
<input name="outsourceRequisitionNo" th:field="*{outsourceRequisitionNo}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> |
|||
<div class="col-sm-6"> |
|||
<select id="reApply" name="p_B_reApply" class="form-control m-b"> |
|||
<option value="true">重新申请</option> |
|||
<option value="false">结束流程</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="container" id="material"> |
|||
</div> |
|||
</form> |
|||
<!-- 订单合计--> |
|||
<div class="container"> |
|||
<div class="row"><h4 class="card-header">订单合计:</h4></div> |
|||
<div class="col-xs-12"> |
|||
<div class="col-sm-6"> |
|||
<label for="materialAmount" class="col-sm-4 col-form-label">物料合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="materialAmount" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6"> |
|||
<label for="totalAmount" class="col-sm-4 col-form-label">领料数量合计:</label> |
|||
<div class="col-sm-6"> |
|||
<input type="text" class="form-control" value="0" id="totalAmount" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: summernote-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/outsourceRequisition"; |
|||
$("#form-outsourceRequisition-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
var outsourcePlanDetailList = []; |
|||
// var chargeUnitDatas = [[${@dict.getType("charge_unit")}]] |
|||
// var formId = "form-plan-outsourceOrder-add"; |
|||
var outsourcePlanCode = ''; |
|||
var materialList = []; |
|||
var tableIdList = []; |
|||
var $processContent; |
|||
var $supplierheaderContent; |
|||
var materials; |
|||
var outsourceProcessAmount = 0; |
|||
var actualOutsourceAmount = 0; |
|||
var outsourceRequisition = [[${outsourceRequisition}]]; |
|||
var outsourceRequisitionNo = [[${outsourceRequisition.outsourceRequisitionNo}]]; |
|||
var originMaterial = [] |
|||
|
|||
$(function() { |
|||
originMaterial = outsourceRequisition.outsourceRequisitionDetailList; |
|||
materials = mergeRecords(originMaterial); |
|||
$("#totalAmount").val(outsourceRequisition.totalAmount); |
|||
|
|||
console.log(materials); |
|||
|
|||
// 遍历委外计划详情信息 |
|||
materials.forEach(function (material, index) { |
|||
var tableId = 'materialNo-' + (index+1); |
|||
|
|||
var materialTable = "bootstrap-table_" + tableId; |
|||
tableIdList.push(materialTable); |
|||
// 创建物料信息的容器 |
|||
var $tableWrapper = $('<div id="material-' + tableId + '"></div>'); |
|||
// 将整个物料信息容器添加到页面 |
|||
$('#material').append($tableWrapper); |
|||
// 添加关联销售订单号信息 |
|||
var $headerDiv = |
|||
$('<div class="row">' + |
|||
'<div class="col-xs-12" >' + |
|||
'<h3>' + |
|||
'<span><strong>物料 ' + (index+1) + ': </strong> ' + '<strong>关联订单号: </strong></span>' + '<span class="correlationCodes" style="color: blue" id="correlationCodes-' + tableId + '"></span>' + |
|||
'</h3>' + |
|||
'<div class="col-sm-12 material-table">' + |
|||
'<table class="table-materialNo" id="' + materialTable + '">' + '</table>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($headerDiv); |
|||
|
|||
$(".correlationCodes").text(material.correlationCodes); |
|||
$("#materialAmount").val(materials.length); |
|||
|
|||
// console.log(outsourceOrderList[0].outsourceOrderNo); |
|||
var materialObj = { |
|||
outsourceRequisitionNo: material.outsourceRequisitionNo, |
|||
materialNo: material.materialNo, |
|||
materialPhotourl: material.materialPhotourl, |
|||
materialName: material.materialName, |
|||
materialType: material.materialType, |
|||
description: material.description, |
|||
unit: material.unit, |
|||
brand: material.brand, |
|||
processMethod: material.processMethod, |
|||
correlationCodes: material.correlationCodes, |
|||
actualOutsourceAmount: material.actualOutsourceAmount, |
|||
plannedOutsourceAmount: material.plannedOutsourceAmount, |
|||
alreadyRequisitionAmount: material.takenMaterial, |
|||
nowRequisitionAmount: material.takingMaterial, |
|||
}; |
|||
var materialData = [materialObj]; // Bootstrap Table需要一个数组作为数据源 |
|||
materialList.push(material); |
|||
tables(materialTable, materialData); |
|||
|
|||
var $MaterialNumDiv = |
|||
$('<div class="row" style="margin-top: 20px;margin-left: 10px;">' + |
|||
'<div class="col-xs-12">' + |
|||
'<h3>' + |
|||
'<span><strong>供应商</strong></span>' + |
|||
'</h3>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$tableWrapper.append($MaterialNumDiv); |
|||
|
|||
var $processInfo = $('<div class="process-card" style="height: 60px;" id="processInfo-' + tableId + '"></div>'); |
|||
|
|||
if(material.processList.length <= 0){ |
|||
var $noProcessDiv = $('<div class="no-process">暂无委外工序信息,请先添加委外工序信息。</div>'); |
|||
$tableWrapper.append($noProcessDiv); |
|||
}else{ |
|||
material.processList.forEach(function(detail, detailsIndex) { |
|||
// console.log(processIndex); |
|||
var processSelectId = 'process-select-' + tableId + '_' + (detailsIndex+1); |
|||
var processTableId = 'process-' + tableId + '_' + (detailsIndex+1); |
|||
|
|||
$processContent = |
|||
$('<div class="card-header process_card" id="process-' + tableId + '_' + (detailsIndex+1) + '" >' + |
|||
'<div class="row" style="margin-left: 25px;height: 20px">' + |
|||
'<div class="card-text">' + |
|||
'<h5>委外工序 ' + (detailsIndex+1) + ':' + |
|||
'<span style="color: blue" class="outsourceProcessInfo">' + detail.outsourceProcessInfo + '</span>' + |
|||
'</h5>' + |
|||
'</div>' + |
|||
'<div class="col-xs-12" style="padding-left: 0px;">' + |
|||
'<div class="col-sm-12" style="padding-left: 0px;" id="chargeUnit-'+processSelectId+'">' + |
|||
'<span class="chargeUnit" style="padding-right: 10px;">*计价单位:</span>' + |
|||
'<span class="chargeUnitInfo" style="padding-right: 80px;">' + detail.chargeUnitInfo + '</span>' + |
|||
'<span class="singleMaterial" style="padding-right: 10px;">每个物料:</span>' + |
|||
'<span class="singleMaterialInfo">' + detail.singleMaterialInfo + '</span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'); |
|||
|
|||
$tableWrapper.append($processContent); |
|||
$supplierheaderContent = |
|||
$('<div class="card-header suppplier_card" id = "supplier-' + processTableId + '_' + ' ">' + |
|||
'<div class="col-xs-12">' + |
|||
'<div class="col-sm-4" style="margin-top: 13px;padding-left: 10px;">' + |
|||
'<input type="radio" id="supplier-' + processTableId + '" name="supplier-' + processTableId + '" value="" checked>' + |
|||
'<span class="supplierInfo">' + detail.supplierInfo + '</span>' + |
|||
|
|||
'</div>' + |
|||
'<div class="col-sm-8 deliveryTime-'+processTableId+'" style="padding-top: 10px;padding-left: 0px;">' + |
|||
'<label class="col-sm-2" style="padding-left: 0px;margin-top: 5px;">计划交付时间: </label>' + |
|||
'<div class ="col-sm-4">' + |
|||
'<div class="input-group date"> ' + |
|||
'<input type="text" disabled name="deliveryTime" value="' + detail.deliveryTimeInfo + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + processTableId + '">' + |
|||
'<span class="input-group-addon"><i class="fa fa-calendar"></i></span>' + |
|||
'</div>' + |
|||
'</div>' + |
|||
'</div>'+ |
|||
|
|||
'</div>' + |
|||
'</div>'+ |
|||
'<div class="row">' + |
|||
'<div class="hr-line-dashed" style="margin-bottom: 0px;margin-top: 80px;">' + |
|||
'</div>' + |
|||
'</div>'); |
|||
$("#"+processTableId).append($supplierheaderContent); |
|||
}); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
function tables(tableId, data) { |
|||
$('#' + tableId).bootstrapTable({ |
|||
showExport: false, |
|||
showFooter: false, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showColumns: false, |
|||
showToggle: false, |
|||
data: data, |
|||
columns: [ |
|||
{title: '料号', field: 'materialNo'}, |
|||
{title: '图片', field: 'materialPhotourl', formatter: function (value, row, index) { |
|||
return $.table.imageView(value); |
|||
} |
|||
}, |
|||
{title: '物料名称', field: 'materialName'}, |
|||
{title: '物料描述', field: 'description'}, |
|||
{title: '品牌', field: 'brand'}, |
|||
{title: '单位', field: 'unit', align: 'center', }, |
|||
{title: '加工方式', field: 'processMethod', align: 'center',}, |
|||
{title: '计划委外数', field: 'plannedOutsourceAmount'}, |
|||
{title: '实际委外数', field: 'actualOutsourceAmount'}, |
|||
{title: '已委外领料数', field: 'alreadyRequisitionAmount'}, |
|||
{title: '本次领料数', field: 'nowRequisitionAmount', |
|||
formatter: function(value, row, index) { |
|||
var html = $.common.sprintf("<input class='form-control' type='number' name='nowRequisitionAmount' id = 'nowRequisitionAmount_"+tableId+"' value='"+data[index].nowRequisitionAmount+"'>", index, value); |
|||
return html; |
|||
} |
|||
}, |
|||
], |
|||
}); |
|||
$('input[name="nowRequisitionAmount"]').on('input', function() { |
|||
calculateTotal(); |
|||
}); |
|||
} |
|||
// 计算总领料数 |
|||
function calculateTotal() { |
|||
var inputs = $('input[name="nowRequisitionAmount"]'); |
|||
var total = 0; |
|||
|
|||
inputs.each(function() { |
|||
var value = parseFloat($(this).val()) || 0; // 将输入框的值转换为数字,默认为0 |
|||
total += value; |
|||
}); |
|||
// console.log("总领料数:" + total); |
|||
$("#totalAmount").val(total); |
|||
}; |
|||
// 函数用于合并重复的material的记录 |
|||
function mergeRecords(items) { |
|||
return items.reduce((merged, current) => { |
|||
const existingRecord = merged.find(record => record.materialNo === current.materialNo); |
|||
if (existingRecord) { |
|||
if (!existingRecord.processList) { |
|||
existingRecord.processList = []; |
|||
} |
|||
existingRecord.processList.push({ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}); |
|||
} else { |
|||
merged.push({ |
|||
outsourceRequisitionNo: current.outsourceRequisitionNo, |
|||
materialNo: current.materialNo, |
|||
materialPhotourl: current.materialPhotourl, |
|||
materialName: current.materialName, |
|||
materialType: current.materialType, |
|||
description: current.description, |
|||
unit: current.unit, |
|||
brand: current.brand, |
|||
processMethod: current.processMethod, |
|||
correlationCodes: current.correlationCodes, |
|||
plannedOutsourceAmount: current.plannedOutsourceAmount, |
|||
actualOutsourceAmount: current.actualOutsourceAmount, |
|||
takenMaterial: current.takenMaterial, |
|||
takingMaterial: current.takingMaterial, |
|||
processList:[{ |
|||
outsourceProcessInfo: current.outsourceProcessInfo, |
|||
chargeUnitInfo: current.chargeUnitInfo, |
|||
singleMaterialInfo: current.singleMaterialInfo, |
|||
supplierInfo: current.supplierInfo, |
|||
deliveryTimeInfo: current.deliveryTimeInfo, |
|||
}], |
|||
}); |
|||
} |
|||
return merged; |
|||
}, []); |
|||
}; |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-outsourceRequisition-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue