提交 db60b995 编写于 作者: L LAPTOP-UV1MNL38\18023

feat:销售订单转预生产计划、加工单转领料单、加工单转补料单、加工单转退料单

上级 5ba8dae6
...@@ -24,31 +24,39 @@ layui.config({ ...@@ -24,31 +24,39 @@ layui.config({
limits: getLimits(), limits: getLimits(),
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) { { field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>'; var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}}, if (!isNull(d.fromId)) {
{ field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}}, str += '<span class="state-new">[转]</span>';
{ colspan: '3', title: '加工成品信息', align: 'center' }, }
return str;
}},
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'processInstanceId', rowspan: '2', title: '流程ID', width: 100, templet: function (d) { { field: 'processInstanceId', rowspan: '2', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>'; return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}}, }},
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) { { field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name');
}}, }},
{ colspan: '3', title: '加工信息', align: 'center' }, { field: 'pickState', rowspan: '2', title: '领料状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name');
}},
{ field: 'departmentMation', title: '加工部门', rowspan: '2', align: 'left', width: 200, templet: function (d) {
return getNotUndefinedVal(d.departmentMation?.name);
}},
{ field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, { field: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, { field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, { field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, { field: 'lastUpdateTime', rowspan: '2', 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'} { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'}
], [ ], [
{ field: 'materialMation', title: '名称', align: 'left', width: 120, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}}, { field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
{ field: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}}, return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name');
{ field: 'needNum', title: '加工数量', align: 'center', width: 80 }, }},
{ field: 'departmentMation', title: '加工部门', align: 'left', width: 100, templet: function (d) {return isNull(d.departmentMation) ? '' : d.departmentMation.name}}, { field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
{ field: 'startTime', title: '开始时间', align: 'center', width: 150 }, return getNotUndefinedVal(d.fromMation?.oddNumber);
{ field: 'endTime', title: '结束时间', align: 'center', width: 150 } }},
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
...@@ -69,6 +77,12 @@ layui.config({ ...@@ -69,6 +77,12 @@ layui.config({
edit(data); edit(data);
} else if (layEvent === 'subApproval') { // 提交审核 } else if (layEvent === 'subApproval') { // 提交审核
subApproval(data); subApproval(data);
}else if (layEvent === 'processingToMaterialRequisition') { //转领料单
processingToMaterialRequisition(data);
} else if (layEvent === 'processingToSupplementMaterials') { //转补料单
processingToSupplementMaterials(data);
} else if (layEvent === 'processingToReturnMaterials') { //转退料单
processingToReturnMaterials(data);
} else if (layEvent === 'processDetails') { // 工作流流程详情查看 } else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data); activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销 } else if (layEvent === 'revoke') { //撤销
...@@ -76,6 +90,44 @@ layui.config({ ...@@ -76,6 +90,44 @@ layui.config({
} }
}); });
// 转领料单
function processingToMaterialRequisition(data) {
_openNewWindows({
url: "../../tpl/erpMachin/processingToMaterialRequisition.html?id=" + data.id,
title: "转领料单",
pageId: "processingToMaterialRequisition",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//转补料单
function processingToSupplementMaterials(data){
_openNewWindows({
url: "../../tpl/erpMachin/processingToSupplementMaterials.html?id=" + data.id,
title: '转补料单',
pageId: "processingToSupplementMaterials",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//转退料单
function processingToReturnMaterials(data){
_openNewWindows({
url: "../../tpl/erpMachin/processingToReturnMaterials.html?id=" + data.id,
title: '转退料单',
pageId: "processingToReturnMaterials",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 添加 // 添加
$("body").on("click", "#addBean", function() { $("body").on("click", "#addBean", function() {
_openNewWindows({ _openNewWindows({
......
// 以下两个参数开启团队权限时有值
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");
// 加工单转领料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// data.pickChildList =data.machinChildList
// 领料单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100500002', data, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickRequest", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove();
},
tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
}
});
}});
});
\ No newline at end of file
// 以下两个参数开启团队权限时有值
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");
// 加工单转退料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransReturnById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// data.pickChildList =data.machinChildList
// 退料单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100600006', data, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickReturn", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove();
},
tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
}
});
}});
});
\ No newline at end of file
// 以下两个参数开启团队权限时有值
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");
// 加工单转补料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// data.pickChildList =data.machinChildList
// 领料的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100600002', data, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickPatch", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove();
},
tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
}
});
}});
});
\ No newline at end of file
...@@ -33,6 +33,17 @@ ...@@ -33,6 +33,17 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a> <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }} {{# } }}
{{# } }} {{# } }}
{{# if (d.state == 'pass') { }}
{{# if (auth('1721379823318')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToMaterialRequisition">转领料单</a>
{{# } }}
{{# if (auth('1721379731773')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToSupplementMaterials">转补料单</a>
{{# } }}
{{# if (auth('1721379845821')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToReturnMaterials">转退料单</a>
{{# } }}
{{# } }}
</script> </script>
</div> </div>
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
......
<!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/erpMachin/'}).use('processingToMaterialRequisition');
</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/erpMachin/'}).use('processingToReturnMaterials');
</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/erpMachin/'}).use('processingToSupplementMaterials');
</script>
</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.
先完成此消息的编辑!
想要评论请 注册