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