|
|
@ -56,7 +56,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group"> |
|
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:warehouseOutOrder:export"> |
|
|
|
<a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:warehouseOutOrder:export"> |
|
|
|
<i class="fa fa-download"></i> 导出 |
|
|
|
</a> |
|
|
|
</div> |
|
|
@ -102,6 +102,7 @@ |
|
|
|
restoreUrl: prefix + "/restore/{id}", |
|
|
|
exportUrl: prefix + "/export", |
|
|
|
modalName: "仓库出库单", |
|
|
|
showFooter: true, |
|
|
|
detailView: true, |
|
|
|
onExpandRow : function(index, row, $detail) { |
|
|
|
initChildTable(index, row, $detail); |
|
|
@ -150,10 +151,24 @@ |
|
|
|
{ |
|
|
|
title: '物料合计', |
|
|
|
field: 'materialSum', |
|
|
|
formatter: function(value) { |
|
|
|
var sum = 0; |
|
|
|
for (var i in value) { |
|
|
|
sum += parseFloat(value[i].materialSum) || 0; |
|
|
|
} |
|
|
|
return "总物料合计: " + sum.toFixed(2); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '数量合计', |
|
|
|
field: 'enterpriseSum', |
|
|
|
formatter: function(value) { |
|
|
|
var sum = 0; |
|
|
|
for (var i in value) { |
|
|
|
sum += parseFloat(value[i].enterpriseSum) || 0; |
|
|
|
} |
|
|
|
return "总数量合计: " + sum.toFixed(2); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '出库数', |
|
|
@ -194,68 +209,68 @@ |
|
|
|
var actions = []; |
|
|
|
/*销售单-准备物料*/ |
|
|
|
if (row.warehouseOutStatus == 0 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + prepareMaterialFlag + '" href="javascript:void(0)" onclick="prepareMaterial(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>准备物料</a> '); |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + prepareMaterialDetailFlag + '" href="javascript:void(0)" onclick="prepareMaterialDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + prepareMaterialFlag + '" href="javascript:void(0)" onclick="prepareMaterial(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>准备物料</a> '); |
|
|
|
actions.push('<a class="' + prepareMaterialDetailFlag + '" href="javascript:void(0)" onclick="prepareMaterialDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
/*销售单-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + salesOutWarehouseFlag + '" href="javascript:void(0)" onclick="salesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class=" ' + salesOutWarehouseFlag + '" href="javascript:void(0)" onclick="salesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*销售单-出库详情*/ |
|
|
|
if (row.warehouseOrderType == 0 && row.warehouseOutType == 0 && row.warehouseOutStatus != 0 ){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + salesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="salesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + salesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="salesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*生产单-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 1 && row.warehouseOutType == 1){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + makeOutWarehouseFlag + '" href="javascript:void(0)" onclick="makeOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class="' + makeOutWarehouseFlag + '" href="javascript:void(0)" onclick="makeOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
/*生产单-出库 详情*/ |
|
|
|
if (row.warehouseOrderType == 1 && row.warehouseOutType == 1){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + makeOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="makeOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + makeOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="makeOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*请购单-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 2 && row.warehouseOutType == 2){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + requisitioningOutWarehouseFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class=" ' + requisitioningOutWarehouseFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*请购单-出库 详情*/ |
|
|
|
if (row.warehouseOrderType == 2 && row.warehouseOutType == 2){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + requisitioningOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + requisitioningOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*退换货-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 4 && row.warehouseOutType == 4){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + refundsExchangesOutWarehouseFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class=" ' + refundsExchangesOutWarehouseFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*退换货-出库详情*/ |
|
|
|
if (row.warehouseOrderType == 4 && row.warehouseOutType == 4){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + refundsExchangesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + refundsExchangesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*开发修改单-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 5 && row.warehouseOutType == 5){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + developModifyOutWarehouseFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class="' + developModifyOutWarehouseFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*开发修改单-出库详情*/ |
|
|
|
if (row.warehouseOrderType == 5 && row.warehouseOutType == 5){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + developModifyOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class="' + developModifyOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
/*委外单-出库*/ |
|
|
|
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 3 && row.warehouseOutType == 3){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + outsourceOutWarehouseFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
actions.push('<a class="' + outsourceOutWarehouseFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> '); |
|
|
|
} |
|
|
|
/*生产单-出库 详情*/ |
|
|
|
if (row.warehouseOrderType == 3 && row.warehouseOutType == 3){ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + outsourceOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
actions.push('<a class=" ' + outsourceOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|
|
|
} |
|
|
|
|
|
|
|
return actions.join(''); |
|
|
|
var actionLinks = actions.join(''); |
|
|
|
return $.table.dropdownToggle(actionLinks); |
|
|
|
} |
|
|
|
}] |
|
|
|
}; |
|
|
|