|
@ -19,14 +19,21 @@ |
|
|
<input type="text" name="saleNo"/> |
|
|
<input type="text" name="saleNo"/> |
|
|
</li> |
|
|
</li> |
|
|
<li> |
|
|
<li> |
|
|
<label>领料员:</label> |
|
|
<label>关联生产订单号:</label> |
|
|
<input type="text" name="pickUser"/> |
|
|
<input type="text" name="makeNo"/> |
|
|
|
|
|
</li> |
|
|
|
|
|
<li> |
|
|
|
|
|
<label>申请人:</label> |
|
|
|
|
|
<!-- <input type="text" name="applyUser"/>--> |
|
|
|
|
|
<select name="applyUser"> |
|
|
|
|
|
<option value="">所有</option> |
|
|
|
|
|
</select> |
|
|
</li> |
|
|
</li> |
|
|
<li class="select-time"> |
|
|
<li class="select-time"> |
|
|
<label>创建时间: </label> |
|
|
<label>录入时间: </label> |
|
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> |
|
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|
|
<span>-</span> |
|
|
<span>-</span> |
|
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/> |
|
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|
|
</li> |
|
|
</li> |
|
|
<li> |
|
|
<li> |
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|
@ -44,7 +51,7 @@ |
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorderpick:remove"> |
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:makeorderpick:remove"> |
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
</a> |
|
|
</a> |
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:makeorderpick:export"> |
|
|
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="system:makeorderpick:export"> |
|
|
<i class="fa fa-download"></i> 导出 |
|
|
<i class="fa fa-download"></i> 导出 |
|
|
</a> |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
@ -67,6 +74,22 @@ |
|
|
var prefix = ctx + "system/makeorderpick"; |
|
|
var prefix = ctx + "system/makeorderpick"; |
|
|
|
|
|
|
|
|
$(function() { |
|
|
$(function() { |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: prefix + '/getBinessMembers', |
|
|
|
|
|
type: 'get', |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (res.rows.length > 0) { |
|
|
|
|
|
var usertData = res.rows; |
|
|
|
|
|
for (let i in usertData) { |
|
|
|
|
|
$("select[name='applyUser']").append( |
|
|
|
|
|
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>"); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
$.modal.msgError(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
var options = { |
|
|
var options = { |
|
|
url: prefix + "/list", |
|
|
url: prefix + "/list", |
|
|
createUrl: prefix + "/add", |
|
|
createUrl: prefix + "/add", |
|
@ -91,96 +114,138 @@ |
|
|
{ |
|
|
{ |
|
|
field: 'instanceId', |
|
|
field: 'instanceId', |
|
|
title: '流程实例ID', |
|
|
title: '流程实例ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'submitInstanceId', |
|
|
field: 'submitInstanceId', |
|
|
title: '流程提交实例ID', |
|
|
title: '流程提交实例ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'cancelInstanceId', |
|
|
field: 'cancelInstanceId', |
|
|
title: '流程作废实例ID', |
|
|
title: '流程作废实例ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'restoreInstanceId', |
|
|
field: 'restoreInstanceId', |
|
|
title: '流程恢复实例ID', |
|
|
title: '流程恢复实例ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'instanceTypeName', |
|
|
field: 'instanceTypeName', |
|
|
title: '流程实例类型', |
|
|
title: '流程实例类型', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'applyUser', |
|
|
field: 'applyUser', |
|
|
|
|
|
align: 'center', |
|
|
title: '申请人ID', |
|
|
title: '申请人ID', |
|
|
visible: false |
|
|
visible: false |
|
|
|
|
|
}, |
|
|
|
|
|
{ title: '当前状态',field: 'taskStatus',align: 'center',width: 120, |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
if(row.auditStatus!="1"&&value != "未启动"){ |
|
|
|
|
|
return '<span class="badge badge-danger">' + value + '</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
if(value === "未启动"){ |
|
|
|
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '生产领料单号', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'pickNo', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'applyUserName', |
|
|
title: '生产订单号', |
|
|
title: '<span style="color: red;">申请人</span>', |
|
|
align: 'center', |
|
|
|
|
|
field: 'makeNo', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '关联销售订单号', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'saleNo', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '领料状态', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'pickStatus', |
|
|
formatter: function(value, row, index) { |
|
|
formatter: function(value, row, index) { |
|
|
return '<span style="color: red;">' + (value ? value : "-") + '</span>'; |
|
|
return $.table.selectDictLabel(pickStatusDatas, value); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '领料员', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'pickUser', |
|
|
|
|
|
visible: false, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '物料合计', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'materialSum', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '数量合计', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
field: 'enterpriseSum', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
field: 'applyUserName', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
title: '申请人', |
|
|
|
|
|
// title: '<span style="color: red;">申请人</span>', |
|
|
|
|
|
// formatter: function(value, row, index) { |
|
|
|
|
|
// return '<span style="color: red;">' + (value ? value : "-") + '</span>'; |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'applyTime', |
|
|
field: 'applyTime', |
|
|
|
|
|
align: 'center', |
|
|
title: '申请时间' |
|
|
title: '申请时间' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'taskId', |
|
|
field: 'taskId', |
|
|
title: '当前任务ID', |
|
|
title: '当前任务ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'todoUserId', |
|
|
field: 'todoUserId', |
|
|
title: '待办用户ID', |
|
|
title: '待办用户ID', |
|
|
|
|
|
align: 'center', |
|
|
visible: false |
|
|
visible: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: 'taskName', |
|
|
field: 'taskName', |
|
|
title: '当前任务名称', |
|
|
title: '当前任务名称', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
|
|
|
visible: false, |
|
|
formatter: function(value, row, index) { |
|
|
formatter: function(value, row, index) { |
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
return '<span class="badge badge-primary">' + value + '</span>'; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '生产订单号', |
|
|
field: 'createTime', |
|
|
field: 'makeNo', |
|
|
align: 'center', |
|
|
}, |
|
|
title: '录入时间', |
|
|
{ |
|
|
|
|
|
title: '关联销售订单号', |
|
|
|
|
|
field: 'saleNo', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '生产领料单号', |
|
|
|
|
|
field: 'pickNo', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '领料状态', |
|
|
|
|
|
field: 'pickStatus', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectDictLabel(pickStatusDatas, value); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '领料员', |
|
|
|
|
|
field: 'pickUser', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '物料合计', |
|
|
|
|
|
field: 'materialSum', |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '数量合计', |
|
|
field: 'updateTime', |
|
|
field: 'enterpriseSum', |
|
|
align: 'center', |
|
|
|
|
|
title: '上次更新时间', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '审核状态', |
|
|
title: '审核状态', |
|
|
field: 'auditStatus', |
|
|
field: 'auditStatus', |
|
|
|
|
|
visible: false, |
|
|
formatter: function(value, row, index) { |
|
|
formatter: function(value, row, index) { |
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
} |
|
|
} |
|
@ -214,10 +279,41 @@ |
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
return actions.join(''); |
|
|
return actions.join(''); |
|
|
} |
|
|
} |
|
|
}] |
|
|
}], |
|
|
|
|
|
rowStyle: function (row, index) { |
|
|
|
|
|
if (row.auditStatus=="0") { |
|
|
|
|
|
// 如果审核状态为待审核,则设置为红色 |
|
|
|
|
|
return {css:{"color":"red"}}; |
|
|
|
|
|
} |
|
|
|
|
|
// 否则使用默认样式 |
|
|
|
|
|
return {}; |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
$.table.init(options); |
|
|
$.table.init(options); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 导出 |
|
|
|
|
|
function exportExcel() { |
|
|
|
|
|
var ids = $.table.selectColumns("pickNo"); |
|
|
|
|
|
var dataParam = $("#formId").serializeArray(); |
|
|
|
|
|
|
|
|
|
|
|
let tipMsg = "确定导出当前所有数据吗?"; |
|
|
|
|
|
if ($.common.isNotEmpty(ids)) { |
|
|
|
|
|
tipMsg = `确定导出 ${ids} 数据吗?`; |
|
|
|
|
|
dataParam.push({ "name": "ids", "value": ids }); |
|
|
|
|
|
} |
|
|
|
|
|
$.modal.confirm(tipMsg, function () { |
|
|
|
|
|
$.modal.loading("正在导出数据,请稍后..."); |
|
|
|
|
|
$.post( prefix + "/export", dataParam, function (result) { |
|
|
|
|
|
if (result.code === web_status.SUCCESS) { |
|
|
|
|
|
window.location.href = ctx + "common/download?fileName="+ encodeURI(result.msg) + "&delete=" + true; |
|
|
|
|
|
} else { |
|
|
|
|
|
$.modal.alertError(result.msg); |
|
|
|
|
|
} |
|
|
|
|
|
$.modal.closeLoading(); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|
</html> |
|
|
</html> |