|
|
@ -108,7 +108,8 @@ |
|
|
|
var editFlag = [[${@permission.hasPermi('erp:material:edit')}]]; |
|
|
|
var auditFlag = [[${@permission.hasPermi('erp:material:audit')}]]; |
|
|
|
var removeFlag = [[${@permission.hasPermi('erp:material:remove')}]]; |
|
|
|
var unRemoveFlag = [[${@permission.hasPermi('erp:material:unRemove')}]]; |
|
|
|
var cancelFlag = [[${@permission.hasPermi('erp:material:cancel')}]]; |
|
|
|
var restoreFlag = [[${@permission.hasPermi('erp:material:restore')}]]; |
|
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
|
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
@ -123,6 +124,8 @@ |
|
|
|
createUrl: prefix + "/add", |
|
|
|
updateUrl: prefix + "/edit/{id}", |
|
|
|
removeUrl: prefix + "/remove", |
|
|
|
cancelUrl: prefix + "/cancel/{id}", |
|
|
|
restoreUrl: prefix + "/restore/{id}", |
|
|
|
exportUrl: prefix + "/export", |
|
|
|
modalName: "物料信息", |
|
|
|
columns: [{ |
|
|
@ -170,22 +173,7 @@ |
|
|
|
field: 'materialType', |
|
|
|
title: '物料类型', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
if ($.common.isEmpty(materialTypeDatas) || $.common.isEmpty(value)) { |
|
|
|
return ''; |
|
|
|
} |
|
|
|
var materialTypeName = ''; |
|
|
|
$.each(materialTypeDatas, function(index, category) { |
|
|
|
var childName = category.name; |
|
|
|
var childSonArray = category.children; |
|
|
|
$.each(childSonArray, function(index, son) { |
|
|
|
var sonCode = son.code; |
|
|
|
var sonName = son.name; |
|
|
|
if (sonCode == value) { |
|
|
|
materialTypeName = childName+"-"+sonName; |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return materialTypeName; |
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -246,8 +234,11 @@ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|
|
|
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i>详情</a> '); |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + auditFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-file-o"></i>审核</a> '); |
|
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a>'); |
|
|
|
actions.push('<a class="btn btn-danger btn-xs ' + unRemoveFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>恢复</a>'); |
|
|
|
if(row.delFlag == '0'){ |
|
|
|
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a>'); |
|
|
|
}else{ |
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a>'); |
|
|
|
} |
|
|
|
return actions.join(''); |
|
|
|
} |
|
|
|
}] |
|
|
|