|
|
@ -67,7 +67,7 @@ |
|
|
|
<i class="fa fa-plus"></i> 添加 |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
|
<div class="col-sm-12 select-table table-striped "> |
|
|
|
<table id="bootstrap-table"></table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -77,8 +77,6 @@ |
|
|
|
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|
|
|
<th:block th:include="include :: datetimepicker-js" /> |
|
|
|
<script th:src="@{/js/activiti.js}"></script> |
|
|
|
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|
|
|
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|
|
|
<script th:inline="javascript"> |
|
|
|
var editFlag = [[${@permission.hasPermi('system:requisitioning:edit')}]]; |
|
|
|
var removeFlag = [[${@permission.hasPermi('system:requisitioning:remove')}]]; |
|
|
@ -115,13 +113,10 @@ |
|
|
|
exportUrl: prefix + "/export", |
|
|
|
detailUrl: prefix + "/detail/{id}", |
|
|
|
modalName: "请购单", |
|
|
|
// pageList: [5, 10, 25, 50], |
|
|
|
// pageSize: 10, |
|
|
|
sortable: true, // 是否启用排序 |
|
|
|
sortStable: true, // 设置为 true 将获得稳定的排序 |
|
|
|
detailView: false, |
|
|
|
fixedColumns: true, // 启用冻结列 |
|
|
|
rightFixedColumns:1, |
|
|
|
fixedRightNumber: 1, // 冻结右列个数 |
|
|
|
showFooter: true, |
|
|
|
columns: [ |
|
|
@ -133,6 +128,15 @@ |
|
|
|
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false}, |
|
|
|
{ title: '流程实例类型', field: 'instanceTypeName',visible: false}, |
|
|
|
{title: '申请人ID',field: 'applyUser', visible: false}, |
|
|
|
{title: '当前任务ID',field: 'taskId',visible: false}, |
|
|
|
{ title: '待办用户ID',field: 'todoUserId', visible: false}, |
|
|
|
{ title: '当前任务名称',field: 'taskName', visible: false}, |
|
|
|
{title: '请购人',field: 'createBy',visible: false}, |
|
|
|
{title: '审核状态',field: 'auditStatus',visible: false, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '请购单编号',field: 'requisitioningCode',align: 'center'}, |
|
|
|
{title: '关联单号',field: 'correlationCode',align: 'center'}, |
|
|
|
{ |
|
|
@ -141,9 +145,6 @@ |
|
|
|
align: 'center', |
|
|
|
}, |
|
|
|
{title: '请购部门',field: 'deptName',align: 'center',}, |
|
|
|
{title: '当前任务ID',field: 'taskId',visible: false}, |
|
|
|
{ title: '待办用户ID',field: 'todoUserId', visible: false}, |
|
|
|
{ title: '当前任务名称',field: 'taskName', visible: false}, |
|
|
|
{ title: '当前状态',field: 'taskStatus', |
|
|
|
align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
@ -156,8 +157,25 @@ |
|
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '物料合计',field: 'materialAmount',align: 'center',}, |
|
|
|
{title: '数量总计',field: 'materialSum',align: 'center',}, |
|
|
|
{title: '物料合计',field: 'materialAmount',align: 'center', |
|
|
|
formatter: function(value) { |
|
|
|
var sum = 0; |
|
|
|
for (var i in value) { |
|
|
|
sum += parseFloat(value[i].materialAmount) || 0; |
|
|
|
} |
|
|
|
return "总物料合计: " + sum.toFixed(2); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '数量总计',field: 'materialSum',align: 'center', |
|
|
|
formatter: function(value){ |
|
|
|
var sum = 0; |
|
|
|
for (var i in value) { |
|
|
|
|
|
|
|
sum += parseFloat(value[i].materialSum) || 0; |
|
|
|
} |
|
|
|
return "总数量合计: " + sum.toFixed(2); |
|
|
|
} |
|
|
|
}, |
|
|
|
// {title: '预估单价合计(RMB)',field: 'noRmbSum',}, |
|
|
|
{title: '预估单价合计(RMB)',field: 'estimatePrice',align: 'center', |
|
|
|
footerFormatter: function (value) { |
|
|
@ -178,37 +196,32 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
{field: 'applyTime',title: '申请时间',align: 'center',}, |
|
|
|
{title: '审核状态',field: 'auditStatus',visible: false, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '请购状态',field: 'requisitioningStatus',align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(requisitioningStatusDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '请购人',field: 'createBy',visible: false}, |
|
|
|
{title: '备注',field: 'remark',align: 'center',}, |
|
|
|
{title: '上次更新时间',field: 'updateTime',align: 'center',}, |
|
|
|
{title: '操作',align: 'center', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
var actions = []; |
|
|
|
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) { |
|
|
|
// 作废 |
|
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>'); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>'); |
|
|
|
// 已作废 |
|
|
|
} |
|
|
|
else{ |
|
|
|
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
} |
|
|
|
if(row.auditStatus == "2" && row.useStatus == "1"){ |
|
|
|
// 编辑 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
actions.push('<a href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
} |
|
|
|
// if(row.auditStatus == "2" && row.useStatus == "1"){ |
|
|
|
// // 编辑 |
|
|
|
// actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
// } |
|
|
|
// 有流程实例id |
|
|
|
if(row.useStatus=="2" && !row.restoreInstanceId){ |
|
|
|
// 恢复 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.requisitioningId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="$.operate.restore(\'' + row.requisitioningId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); |
|
|
|
} |
|
|
|
// 有流程实例id |
|
|
|
if (row.instanceId) { |
|
|
@ -217,17 +230,18 @@ |
|
|
|
var todoUserIdList = row.todoUserId.split(","); |
|
|
|
if(todoUserIdList.includes(loginName)){ |
|
|
|
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|
|
|
} |
|
|
|
} |
|
|
|
// 审批历史 |
|
|
|
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|
|
|
// 进度查看 |
|
|
|
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|
|
|
} |
|
|
|
// 详情 |
|
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisitioningId + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
|
return actions.join(''); |
|
|
|
actions.push('<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.requisitioningId + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
|
var actionLinks = actions.join(''); |
|
|
|
return $.table.dropdownToggle(actionLinks); |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|