提交 bc1b775f 编写于 作者: H huangcaiyun.

feat:车间任务转工序验收

上级 5a4bd189
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["wholeOut"]["key"];
// 新增
authBtn('1720835673573');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryWholeOrderOutList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 },
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'holderMation', title: '供应商', rowspan: '2', align: 'center', width: 150, templet: function (d) {
return getNotUndefinedVal(d.holderMation?.name);
}},
{ field: 'totalPrice', title: '总金额', rowspan: '2', align: 'center', width: 140 },
{ field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name');
}},
{ field: 'otherState', title: '到货状态', rowspan: '2', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderArrivalState", 'id', d.otherState, 'name');
}},
{ field: 'qualityInspection', title: '质检状态', rowspan: '2', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("orderQualityInspectionType", 'id', d.qualityInspection, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
], [
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("wholeOrderOutFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subApproval') { //提交审核
erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() {
loadTable();
});
}else if (layEvent === 'wholeOutToPut') { //转采购入库单
wholeOutToPut(data);
} else if (layEvent === 'wholeOutToArrival') { //转到货单
wholeOutToArrival(data);
}else if (layEvent === 'wholeOutToReturn') { //转采购退货单
wholeOutToReturn(data);
}
});
// 转采购入库
function wholeOutToPut(data) {
_openNewWindows({
url: "../../tpl/wholeOut/wholeOutToPut.html?id=" + data.id,
title: "转采购入库",
pageId: "wholeOutToPut",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//转到货单
function wholeOutToArrival(data){
_openNewWindows({
url: "../../tpl/wholeOut/wholeOutToArrival.html?id=" + data.id,
title: '转到货单',
pageId: "wholeOutToArrival",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//转采购退货
function wholeOutToReturn(data){
_openNewWindows({
url: "../../tpl/wholeOut/wholeOutToReturn.html?id=" + data.id,
title: '转采购退货',
pageId: "wholeOutToReturn",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300002', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "wholeOutAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "wholeOutEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300004&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "wholeOutDetail",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 删除
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpcommon005", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('wholeOutList', {});
});
// 以下两个参数开启团队权限时有值 只是复制过来了
var objectId = '', objectKey = '';
// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断
var serviceClassName;
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var id = GetUrlParam("id");
// 工序验收
// 工序验收的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024071500001', {}, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "writeMachinProcedureAccept", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
// loadComponentCallback: function () {
// $("div[controlType='supplier']").remove();
// $("div[controlType='purchaseDeliveryFromType']").remove();
// },
// tableAddRowCallback: function (tableId) {
// // $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".qualityInspection").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".taxLastinspectionRatio").prop('disabled', true);
//
// }
});
});
\ No newline at end of file
......@@ -38,15 +38,9 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
// {field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
// return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
// }},
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'machinProcedureId', title: '车间ID',width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.machinProcedureId) + '</a>';
}},
{ field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.id) + '</a>';
{ field: 'id', title: '车间任务ID',width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.id) + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinProcedureFarmState", 'id', d.state, 'name');
......@@ -64,20 +58,10 @@ layui.config({
{ field: 'actualEndTime', title: '实际结束时间', align: 'center', width: 140, templet: function (d) {
return getNotUndefinedVal(d.machinProcedureMation?.actualEndTime);
}},
// {field: 'operTime', title: '单据日期', align: 'center', width: 140, templet: function (d) {
// return getNotUndefinedVal(d.departmentMation?.createTime);
// }},
{ field: 'createTime', title: '创建时间', align: 'center', width: 140, templet: function (d) {
return getNotUndefinedVal(d.machinMation?.createTime);
}},
// {field: 'otherState', title: '出库状态', rowspan: '2', width: 90, templet: function (d) {
// return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("outLetState", 'id', d.otherState, 'name');
// }},
// {field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
// {field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
// {field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
// {field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
]],
done: function (json) {
......@@ -96,13 +80,16 @@ layui.config({
receive(data);
} else if (layEvent === 'antiReception') { //反接收
antiReception(data);
}else if (layEvent === 'details') { //详情
details(data);
}else if (layEvent === 'processCheck') { //转工序验收
processCheck(data);
}
});
// 接收
function receive(data) {
layer.confirm('确认要接收该车间任务吗?', { icon: 3, title: '接收任务操作' }, function (index) {
activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
};
......@@ -111,12 +98,10 @@ layui.config({
loadTable();
}});
});
});
}
function antiReception(data) {
layer.confirm('确认要反接收该车间任务吗?', { icon: 3, title: '反接收任务操作' }, function (index) {
activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
};
......@@ -125,9 +110,31 @@ layui.config({
loadTable();
}});
});
});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024072600001&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "workTaskDetail",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
//工序验收
function processCheck(data){
_openNewWindows({
url: "../../tpl/processAcceptance/machiningProcessCheck.html?id=" + data.id,
title: '工序验收',
pageId: "machiningProcessCheck",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet"/>
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet"/>
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<form class="layui-form layui-form-pane" action="" autocomplete="off" style="width: 50%; float: left;">
<select id="workshopId" name="workshopId" lay-filter="workshopId" lay-search="">
</select>
</form>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.state == 'waitReceive') { }}
{{# if(auth('1720939511614')) { }}
<a class="layui-btn layui-btn-xs" lay-event="receive">接收</a>
{{# } }}
{{# if(auth('1720939488183')) { }}
<a class="layui-btn layui-btn-xs" lay-event="antiReception">反接收</a>
{{# } }}
{{# } }}
{{# if(d.state == 'waitExecuted') { }}
{{# if(auth('1721013026647')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processCheckReturn">转工序验收</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/workshopTasks/'}).use('workshopTasksList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div id="content"></div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" type="button" id="cancle"><language showName="com.skyeye.cancel">取消</language></button>
<button class="winui-btn" lay-submit lay-filter="formSaveDraft" id="formSaveDraft">保存为草稿</button>
<button class="winui-btn" lay-submit lay-filter="formWriteBean" id="formWriteBean">提交</button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/processAcceptance/'}).use('machiningWarehouseCheck');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset="utf-8"/>
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet"/>
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet"/>
</head>
<body>
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<form class="layui-form layui-form-pane" action="" autocomplete="off" style="width: 50%; float: left;">
......@@ -27,6 +27,11 @@
<a class="layui-btn layui-btn-xs" lay-event="antiReception">反接收</a>
{{# } }}
{{# } }}
{{# if(d.state == 'waitExecuted') { }}
{{# if(auth('1721013026647')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processCheck">工序验收</a>
{{# } }}
{{# } }}
</script>
</div>
......@@ -35,5 +40,5 @@
<script type="text/javascript">
layui.config({base: '../../js/workshopTasks/'}).use('workshopTasksList');
</script>
</body>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册