|
@ -71,7 +71,9 @@ |
|
|
<div class="col-xs-6"> |
|
|
<div class="col-xs-6"> |
|
|
<label for="stockNo" class="col-sm-6 col-form-label">仓库ID:</label> |
|
|
<label for="stockNo" class="col-sm-6 col-form-label">仓库ID:</label> |
|
|
<div class="col-sm-5"> |
|
|
<div class="col-sm-5"> |
|
|
<select class="form-control" name="stockNo" id="stockNo" disabled ></select> |
|
|
<select class="form-control" name="stockNo" id="stockNo"> |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-xs-6"> |
|
|
<div class="col-xs-6"> |
|
@ -176,6 +178,15 @@ |
|
|
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 |
|
|
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 |
|
|
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|
|
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|
|
var purchaseOrderId = [[${formData.purchaseOrderId}]]; |
|
|
var purchaseOrderId = [[${formData.purchaseOrderId}]]; |
|
|
|
|
|
loadWarehouseCodes(); |
|
|
|
|
|
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过 |
|
|
|
|
|
$("#purchaseMaterialSum").val(purchaseOrder.materialSum); |
|
|
|
|
|
//采购数量合计 |
|
|
|
|
|
$('#purchaseSum').val(purchaseOrder.materialSum); |
|
|
|
|
|
//采购不含税总价 |
|
|
|
|
|
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum); |
|
|
|
|
|
//采购含税总价 |
|
|
|
|
|
$('#purchaseRmbSum').val(purchaseOrder.rmbSum); |
|
|
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 |
|
|
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 |
|
|
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { |
|
|
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { |
|
|
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); |
|
|
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); |
|
@ -202,21 +213,6 @@ |
|
|
createTableForSupplier(supplierCode, supplierData); |
|
|
createTableForSupplier(supplierCode, supplierData); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
loadWarehouseCodes(); |
|
|
|
|
|
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过 |
|
|
|
|
|
$("#purchaseMaterialSum").val(purchaseOrder.materialSum); |
|
|
|
|
|
//采购数量合计 |
|
|
|
|
|
$('#purchaseSum').val(purchaseOrder.materialSum); |
|
|
|
|
|
//采购不含税总价 |
|
|
|
|
|
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum); |
|
|
|
|
|
//采购含税总价 |
|
|
|
|
|
$('#purchaseRmbSum').val(purchaseOrder.rmbSum); |
|
|
|
|
|
$('#stockNo').val(purchaseOrder.stockNo); |
|
|
|
|
|
$('#stockName').val(purchaseOrder.stockName); |
|
|
|
|
|
$('#stockContact').val(purchaseOrder.stockContact); |
|
|
|
|
|
$('#stockPhone').val(purchaseOrder.stockPhone); |
|
|
|
|
|
$('#stockAddress').val(purchaseOrder.stockAddress); |
|
|
|
|
|
|
|
|
|
|
|
//按照物料的维度查看采购订单信息 |
|
|
//按照物料的维度查看采购订单信息 |
|
|
// 初始化表格 |
|
|
// 初始化表格 |
|
|
// 假设purchasePlanChildList已定义并包含了需要处理的数据 |
|
|
// 假设purchasePlanChildList已定义并包含了需要处理的数据 |
|
@ -315,7 +311,7 @@ |
|
|
'<label class="col-sm-4">计划交付时间: </label>' + |
|
|
'<label class="col-sm-4">计划交付时间: </label>' + |
|
|
'<div class ="col-sm-6">' + |
|
|
'<div class ="col-sm-6">' + |
|
|
'<div class="input-group date"> ' + |
|
|
'<div class="input-group date"> ' + |
|
|
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + |
|
|
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" text="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + |
|
|
'<span class="input-group-addon"><i class="fa fa-calendar"></i></span>' + |
|
|
'<span class="input-group-addon"><i class="fa fa-calendar"></i></span>' + |
|
|
'</div> ' + |
|
|
'</div> ' + |
|
|
'</div>' + |
|
|
'</div>' + |
|
@ -404,25 +400,21 @@ |
|
|
{ checkbox: false, visible: false }, |
|
|
{ checkbox: false, visible: false }, |
|
|
{ title: '供应商ID', field: 'supplierCode', visible: false }, |
|
|
{ title: '供应商ID', field: 'supplierCode', visible: false }, |
|
|
{ title: '料号', field: 'materialCode' }, |
|
|
{ title: '料号', field: 'materialCode' }, |
|
|
{ title: '图片', field: 'materialPhotoUrl', formatter: function(value, row, index) { |
|
|
{ title: '图片', field: 'materialPhotoUrl', |
|
|
return $.table.imageView(value); |
|
|
formatter: function(value, row, index) {return $.table.imageView(value);} |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ title: '物料名称', field: 'materialName' }, |
|
|
{ title: '物料名称', field: 'materialName' }, |
|
|
{ title: '物料类型', field: 'materialType', align: 'center', formatter: function(value, row, index) { |
|
|
{ title: '物料类型', field: 'materialType', align: 'center', |
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);} |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ title: '物料描述', field: 'materialDescribe' }, |
|
|
{ title: '物料描述', field: 'materialDescribe' }, |
|
|
{ title: '品牌', field: 'materialBrand' }, |
|
|
{ title: '品牌', field: 'materialBrand' }, |
|
|
{ title: '加工类型', field: 'materialProcessMethod', align: 'center', formatter: function(value, row, index) { |
|
|
{ title: '加工类型', field: 'materialProcessMethod', align: 'center', |
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ title: '单位', field: 'materialUnit', align: 'center' }, |
|
|
{ title: '单位', field: 'materialUnit', align: 'center' }, |
|
|
{ title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function(value, row, index) { |
|
|
{ title: '入库部门', field: 'warehouseDept', align: 'center', |
|
|
return $.table.selectDictLabel(warehouseDeptDatas, value); |
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(warehouseDeptDatas, value);} |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ title: '计划采购数', field: 'materialNum' }, |
|
|
{ title: '计划采购数', field: 'materialNum' }, |
|
|
{ title: '币种', field: '' }, |
|
|
{ title: '币种', field: '' }, |
|
@ -576,6 +568,7 @@ |
|
|
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); |
|
|
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); |
|
|
}); // 遍历返回的数据,添加为下拉框的选项 |
|
|
}); // 遍历返回的数据,添加为下拉框的选项 |
|
|
//设备当前选择的值 |
|
|
//设备当前选择的值 |
|
|
|
|
|
selectElement.val(purchaseOrder.stockNo).trigger('change'); |
|
|
} else { |
|
|
} else { |
|
|
$.modal.errMsg("数据为空"); |
|
|
$.modal.errMsg("数据为空"); |
|
|
} |
|
|
} |
|
@ -611,9 +604,7 @@ |
|
|
}); |
|
|
}); |
|
|
function submitHandler() { |
|
|
function submitHandler() { |
|
|
if ($.validate.form()) { |
|
|
if ($.validate.form()) { |
|
|
if ($('textarea[name="comment"]').val()) { |
|
|
if ($('textarea[name="comment"]').val()) {$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());} |
|
|
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|
|
|
|
|
} |
|
|
|
|
|
var taskId = [[${taskId}]]; |
|
|
var taskId = [[${taskId}]]; |
|
|
$.operate.save(prefix + "/complete/" + taskId, $('#form-purchaseOrder-cgjl').serialize()); |
|
|
$.operate.save(prefix + "/complete/" + taskId, $('#form-purchaseOrder-cgjl').serialize()); |
|
|
} |
|
|
} |
|
|