提交 b3ce84f0 编写于 作者: W WJ-202301081617\Wlos

Merge branch 'company_server' of https://gitee.com/doc_wei01/skyeye into company_server

......@@ -106,7 +106,7 @@ layui.config({
// 甘特图
function gantt(data) {
_openNewWindows({
url: "../../tpl/departmentMachining/machiningGantt.html?objectId=" + data.id + '&objectKey=' + data.serviceClassName,
url: "../../tpl/departmentMachining/machiningGantt.html?id=" + data.id,
title: "车间任务安排甘特图",
pageId: "machiningGantt",
area: ['90vw', '90vh'],
......
var objectKey = "";
var objectId = "";
layui.config({
base: basePath,
......@@ -9,48 +7,37 @@ layui.config({
}).define(['window', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
layer = layui.layer,
laydate = layui.laydate;
objectKey = GetUrlParam("objectKey");
objectId = GetUrlParam("objectId");
if (isNull(objectKey) || isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
}
form = layui.form;
var id = GetUrlParam("id");
// 根据供应商id获取所有审批通过之后的里程碑列表
let milestoneList = [];
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: objectId}, type: 'json', method: 'GET', callback: function (json) {
$("#milestoneId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
milestoneList = json.bean.machinChildList;
console.log(1,json)
console.log(2,milestoneList)
// var authPermission = teamObjectPermissionUtil.checkTeamBusinessAuthPermission(objectId, 'taskAuthEnum');
// var btnStr = `<div style="" class="type-group" id="type">`;
// var firstBtn = true;
// if (authPermission['list']) {
// var defaultClassName = firstBtn ? 'plan-select' : '';
// firstBtn = false;
// btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="list" table-id="messageTable"><i class="layui-icon"></i>所有任务</button>`
// }
// if (authPermission['myExecute']) {
// var defaultClassName = firstBtn ? 'plan-select' : '';
// firstBtn = false;
// btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="myExecute" table-id="messageTable"><i class="layui-icon"></i>我执行的任务</button>`
// }
// if (authPermission['myCreate']) {
// var defaultClassName = firstBtn ? 'plan-select' : '';
// btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="myCreate" table-id="messageTable"><i class="layui-icon"></i>我创建的任务</button>`
// }
// btnStr += `</div>`;
// $(".txtcenter").before(btnStr);
// 根据id查询加工单信息
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
console.log(json)
matchingLanguage();
form.render();
renderPanel();
render();
// render();
gantt.clearAll(); //清空缓存
let nodeList = json.bean.node;
if (isNull(nodeList) || nodeList.length == 0) {
return;
}
$.each(nodeList, function (i, item) {
item.start_date = new Date(item.start_date);
item.end_date = new Date(item.end_date);
});
let linkList = json.bean.link;
if (isNull(linkList) || linkList.length == 0) {
linkList = [];
}
// 解析
gantt.parse({
data: nodeList,
links: linkList
});
}});
function renderPanel() {
......@@ -140,44 +127,43 @@ layui.config({
gantt.init("device_load");
gantt.i18n.setLocale("cn"); //使用中文
function render() {
let milestoneId = $("#milestoneId").val();
if (isNull(milestoneId)) {
winui.window.msg("请选择产品", {icon: 2, time: 2000});
return false;
}
let params = {
id: objectId,
// objectKey: objectKey,
// holderId: milestoneId,
// type: $("#type .plan-select").attr("data-type")
};
var tem = getInPoingArr(milestoneList, "id", milestoneId, null);
gantt.config.start_date = new Date(tem.startTime);
gantt.config.end_date = new Date(tem.endTime);
console.log(999)
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: params, type: 'json', method: 'GET', callback: function (json) {
console.log(88,json)
gantt.clearAll(); //清空缓存
let nodeList = json.bean.node;
if (isNull(nodeList) || nodeList.length == 0) {
return;
}
$.each(nodeList, function (i, item) {
item.start_date = new Date(item.start_date);
item.end_date = new Date(item.end_date);
});
let linkList = json.bean.link;
if (isNull(linkList) || linkList.length == 0) {
linkList = [];
}
// 解析
gantt.parse({
data: nodeList,
links: linkList
});
}});
}
// function render() {
// let milestoneId = $("#milestoneId").val();
// if (isNull(milestoneId)) {
// winui.window.msg("请选择产品", {icon: 2, time: 2000});
// return false;
// }
// let params = {
// id: objectId,
// // objectKey: objectKey,
// // holderId: milestoneId,
// // type: $("#type .plan-select").attr("data-type")
// };
// var tem = getInPoingArr(milestoneList, "id", milestoneId, null);
// gantt.config.start_date = new Date(tem.startTime);
// gantt.config.end_date = new Date(tem.endTime);
// console.log(999)
// AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: params, type: 'json', method: 'GET', callback: function (json) {
// gantt.clearAll(); //清空缓存
// let nodeList = json.bean.node;
// if (isNull(nodeList) || nodeList.length == 0) {
// return;
// }
// $.each(nodeList, function (i, item) {
// item.start_date = new Date(item.start_date);
// item.end_date = new Date(item.end_date);
// });
// let linkList = json.bean.link;
// if (isNull(linkList) || linkList.length == 0) {
// linkList = [];
// }
// // 解析
// gantt.parse({
// data: nodeList,
// links: linkList
// });
// }});
// }
$("body").on("click", ".type-btn", function (e) {
$(this).parent().find('.type-btn').removeClass("plan-select");
......
......@@ -24,31 +24,39 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' },
{ field: 'oddNumber', rowspan: '2', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'productionMation', rowspan: '2', title: '生产计划单', align: 'center', width: 200, templet: function (d) {return isNull(d.productionMation) ? '' : d.productionMation.oddNumber}},
{ colspan: '3', title: '加工成品信息', align: 'center' },
{ 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;
}},
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'processInstanceId', rowspan: '2', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) {
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: '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: '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: 'normsMation', title: '规格', align: 'left', width: 200, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.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: 'startTime', title: '开始时间', align: 'center', width: 150 },
{ field: 'endTime', title: '结束时间', align: 'center', width: 150 }
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}},
]],
done: function(json) {
matchingLanguage();
......@@ -69,6 +77,12 @@ layui.config({
edit(data);
} else if (layEvent === 'subApproval') { // 提交审核
subApproval(data);
}else if (layEvent === 'processingToMaterialRequisition') { //转领料单
processingToMaterialRequisition(data);
} else if (layEvent === 'processingToSupplementMaterials') { //转补料单
processingToSupplementMaterials(data);
} else if (layEvent === 'processingToReturnMaterials') { //转退料单
processingToReturnMaterials(data);
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
......@@ -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() {
_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 @@
<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>
</div>
<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
......@@ -24,8 +24,6 @@ layui.config({
AjaxPostUtil.request({url: sysMainMation.projectBasePath + "queryAllApprovalMilestoneList", params: {objectId: objectId}, type: 'json', method: 'GET', callback: function (json) {
$("#milestoneId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
milestoneList = json.rows;
console.log(123,json.rows)
console.log(456,milestoneList)
var authPermission = teamObjectPermissionUtil.checkTeamBusinessAuthPermission(objectId, 'taskAuthEnum');
var btnStr = `<div style="" class="type-group" id="type">`;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册