提交 8c3e49b1 编写于 作者: L LAPTOP-NDCM9L6Q\王丽雅

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

...@@ -36,9 +36,6 @@ layui.config({ ...@@ -36,9 +36,6 @@ layui.config({
return str; return str;
}}, }},
{ colspan: '2', title: '来源单据信息', align: 'center' }, { colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'departmentMation', title: '部门', rowspan: '2', align: 'left', width: 200, templet: function (d) {
return getNotUndefinedVal(d.departmentMation?.name);
}},
{ field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 280, templet: function (d) { { field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 280, 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>';
}}, }},
...@@ -48,11 +45,14 @@ layui.config({ ...@@ -48,11 +45,14 @@ layui.config({
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) { { field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); 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', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2',width: 180 }, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2',width: 180 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', rowspan: '2',width: 150 }, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', rowspan: '2',width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', rowspan: '2',width: 180 }, { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', rowspan: '2',width: 180 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', rowspan: '2',width: 150 }, { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', rowspan: '2',width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', rowspan: '2',width: 240, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', rowspan: '2',width: 300, toolbar: '#tableBar'}
],[ ],[
{ field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) { { field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name');
...@@ -86,6 +86,12 @@ layui.config({ ...@@ -86,6 +86,12 @@ layui.config({
revoke(data); revoke(data);
} else if (layEvent === 'gantt') { //甘特图 } else if (layEvent === 'gantt') { //甘特图
gantt(data); gantt(data);
}else if (layEvent === 'processingToMaterialRequisition') { //转领料单
processingToMaterialRequisition(data);
} else if (layEvent === 'processingToSupplementMaterials') { //转补料单
processingToSupplementMaterials(data);
} else if (layEvent === 'processingToReturnMaterials') { //转退料单
processingToReturnMaterials(data);
} }
}); });
...@@ -116,6 +122,44 @@ layui.config({ ...@@ -116,6 +122,44 @@ layui.config({
}}); }});
} }
// 转领料单
function processingToMaterialRequisition(data) {
_openNewWindows({
url: "../../tpl/departmentMachining/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/departmentMachining/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/departmentMachining/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();
}});
}
// 编辑 // 编辑
function edit(data) { function edit(data) {
_openNewWindows({ _openNewWindows({
......
...@@ -18,7 +18,6 @@ layui.config({ ...@@ -18,7 +18,6 @@ layui.config({
// 加工单转领料单 // 加工单转领料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean; let data = json.bean;
// data.pickChildList =data.machinChildList
// 领料单的【编辑布局】 // 领料单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100500002', data, { dsFormUtil.initEditPageForStatic('content', 'FP2023100500002', data, {
savePreParams: function (params) { savePreParams: function (params) {
...@@ -32,14 +31,9 @@ layui.config({ ...@@ -32,14 +31,9 @@ layui.config({
}, },
loadComponentCallback: function () { loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove(); $("div[controlType='pickFromType']").remove();
}, },
tableAddRowCallback: function (tableId) { tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
} }
}); });
}}); }});
......
...@@ -18,7 +18,6 @@ layui.config({ ...@@ -18,7 +18,6 @@ layui.config({
// 加工单转退料单 // 加工单转退料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransReturnById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransReturnById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean; let data = json.bean;
// data.pickChildList =data.machinChildList
// 退料单的【编辑布局】 // 退料单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100600006', data, { dsFormUtil.initEditPageForStatic('content', 'FP2023100600006', data, {
savePreParams: function (params) { savePreParams: function (params) {
...@@ -32,13 +31,9 @@ layui.config({ ...@@ -32,13 +31,9 @@ layui.config({
}, },
loadComponentCallback: function () { loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove(); $("div[controlType='pickFromType']").remove();
}, },
tableAddRowCallback: function (tableId) { tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
} }
}); });
......
...@@ -18,7 +18,6 @@ layui.config({ ...@@ -18,7 +18,6 @@ layui.config({
// 加工单转补料单 // 加工单转补料单
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean; let data = json.bean;
// data.pickChildList =data.machinChildList
// 领料的【编辑布局】 // 领料的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023100600002', data, { dsFormUtil.initEditPageForStatic('content', 'FP2023100600002', data, {
savePreParams: function (params) { savePreParams: function (params) {
...@@ -32,13 +31,9 @@ layui.config({ ...@@ -32,13 +31,9 @@ layui.config({
}, },
loadComponentCallback: function () { loadComponentCallback: function () {
// $("select[attrkey='departmentId']").prop('disabled', true);
$("div[controlType='pickFromType']").remove(); $("div[controlType='pickFromType']").remove();
}, },
tableAddRowCallback: function (tableId) { tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
} }
}); });
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
// 提交类型,1.工序验收;2.生成验收单
var subType = GetUrlParam("subType");
var id = GetUrlParam("id");
var needNum = parseInt(GetUrlParam("needNum"));
$("#acceptNum").val(needNum);
$("#quantityNum").val(needNum);
if(subType == 1){
$("#depotIdBox").remove();
} else {
erpOrderUtil.getDepotList(function (json){
// 加载仓库数据
$("#depotId").html(getDataUseHandlebars(selOption, json));
form.render('select');
});
}
$("body").on("input", "#acceptNum", function() {
calcNum(1);
});
$("body").on("change", "#acceptNum", function() {
calcNum(1);
});
$("body").on("input", "#belowNum", function() {
calcNum(2);
});
$("body").on("change", "#belowNum", function() {
calcNum(2);
});
function calcNum(type){
var changeNum = 0;
if(type == 1){
changeNum = parseInt(isNull($("#acceptNum").val()) ? "0" : $("#acceptNum").val());
$("#belowNum").val(needNum - changeNum);
} else {
changeNum = parseInt(isNull($("#belowNum").val()) ? "0" : $("#belowNum").val());
$("#acceptNum").val(needNum - changeNum);
}
}
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
if (parseInt(isNull($("#quantityNum").val()) ? "0" : $("#quantityNum").val()) < 0) {
winui.window.msg('合格数量不能小于0.', {icon: 2, time: 2000});
return false;
}
if (parseInt(isNull($("#belowNum").val()) ? "0" : $("#belowNum").val()) < 0) {
winui.window.msg('不合格数量不能小于0.', {icon: 2, time: 2000});
return false;
}
if (parseInt($("#belowNum").val()) + parseInt($("#quantityNum").val()) != needNum) {
winui.window.msg('合格数量以及不合格数量总和与总量不匹配.', {icon: 2, time: 2000});
return false;
}
var params = {
childId: id,
acceptNum: $("#acceptNum").val(),
belowNum: $("#belowNum").val(),
depotId: (subType == 1) ? "" : $("#depotId").val()
};
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpmachin012", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'erpmachin010',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: 'radio', rowspan: '2'},
{ 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' },
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name');
}},
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name');
}},
{ colspan: '3', title: '加工信息', align: 'center' },
{ 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 },
], [
{ 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 }
]],
done: function(json, curr, count){
matchingLanguage();
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function(){
var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = json.rows[chooseIndex];
// 根据id获取加工单信息
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: obj.id}, type: 'json', method: 'GET', callback: function(json) {
parent.machinMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
}});
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function(){
var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
click.find("input[type='radio']").prop("checked", true);
form.render();
})
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 === 'details') { // 详情
details(data);
}
});
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('erpMachinStateIsPassNoComplateChoose', {});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var id = GetUrlParam("id");
var machinMation;
loadData();
function loadData() {
var loadAcceptanceBtn = false;
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
machinMation = json.bean;
$.each(json.bean.machinChildList, function(i, item) {
item.unitPrice = parseFloat(item.unitPrice).toFixed(2);
item.quantityNum = item.acceptNum - item.belowNum;
item.stateName = skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinChildStateEnum", 'id', item.state, 'name');
if (item.state == 'waitForCheckig' && !loadAcceptanceBtn) {
loadAcceptanceBtn = true;
if (i == (json.bean.machinChildList.length - 1)) {
item.operator = '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal acceptance" rowId="' + item.id + '" subType="2">工序验收</button>';
} else {
item.operator = '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal acceptance" rowId="' + item.id + '" subType="1">工序验收</button>';
}
}
});
$("#showForm").html(getDataUseHandlebars($("#useTemplate").html(), json));
}});
}
// 工序验收
$("body").on("click", ".acceptance", function() {
var id = $(this).attr('rowId');
var subType = $(this).attr('subType');
_openNewWindows({
url: "../../tpl/erpMachin/erpMachinAcceptance.html?id=" + id + '&subType=' + subType + '&needNum=' + machinMation.needNum,
title: '工序验收',
pageId: "acceptance",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadData();
}});
});
});
\ No newline at end of file
...@@ -35,6 +35,17 @@ ...@@ -35,6 +35,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('1721442458082')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToMaterialRequisition">转领料单</a>
{{# } }}
{{# if (auth('1721442482395')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToSupplementMaterials">转补料单</a>
{{# } }}
{{# if (auth('1721442499305')) { }}
<a class="layui-btn layui-btn-xs" lay-event="processingToReturnMaterials">转退料单</a>
{{# } }}
{{# } }}
<a class="layui-btn layui-btn-xs" lay-event="gantt">甘特图</a> <a class="layui-btn layui-btn-xs" lay-event="gantt">甘特图</a>
</script> </script>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/erpMachin/'}).use('processingToMaterialRequisition'); layui.config({base: '../../js/departmentMachining/'}).use('processingToMaterialRequisition');
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/erpMachin/'}).use('processingToReturnMaterials'); layui.config({base: '../../js/departmentMachining/'}).use('processingToReturnMaterials');
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/erpMachin/'}).use('processingToSupplementMaterials'); layui.config({base: '../../js/departmentMachining/'}).use('processingToSupplementMaterials');
</script> </script>
</body> </body>
</html> </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 class="winui-tip alert-info" id="showInfo">该数据仅展示已经由上级审批通过的部门加工单信息。</div>
<div class="winui-toolbar">
<div class="winui-tool">
<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 == 'pass') { }}
{{# if(auth('1696385978429')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="machinAccept">工序验收</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/erpMachin/'}).use('erpDepartMachinList');
</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 class="layui-form-item layui-col-xs12">
<span class="hr-title">工序验收</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">待验收数量:</label>
<div class="layui-input-block">
<input type="text" id="acceptNum" name="acceptNum" placeholder="请输入待验收数量" class="layui-input" readonly="readonly"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12" id="depotIdBox">
<label class="layui-form-label">入库仓库<i class="red">*</i></label>
<div class="layui-input-block">
<select id="depotId" name="depotId" lay-search="" win-verify="required">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">合格数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="quantityNum" name="quantityNum" placeholder="请输入合格数量" class="layui-input" value="0" win-verify="required|number"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">不合格数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="belowNum" name="belowNum" placeholder="请输入不合格数量" class="layui-input" value="0" win-verify="required|number"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></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('erpMachinAcceptance');
</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 class="winui-toolbar">
<div class="winui-tool">
<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>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1593442212544"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.editRow == 1) { }}
{{# if(auth('1593700472791')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1593442212544')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1593697910273')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == 2) { }}
{{# if(auth('1696385978429')) { }}
<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>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/erpMachin/'}).use('erpMachinList');
</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 class="winui-tip alert-info" id="showInfo">加工单选择规则:1.单选,双击指定行数据即可选中;2.已审批通过的未完成的加工单。如没有查到要选择的单据,请检查单据信息是否满足当前规则。</div>
<div class="winui-toolbar">
<div class="winui-tool">
<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>
</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('erpMachinStateIsPassNoComplateChoose');
</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="height: 100%">
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" id="orderMationLi">工序验收信息</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<form class="layui-form" action="" id="showForm">
</form>
</div>
</div>
</div>
</div>
<!-- useTemplate -->
<script type="text/x-handlebars-template" id="useTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">工序资料</label>
<div class="layui-input-block">
<table class="layui-table" style="table-layout: fixed">
<thead>
<tr>
<th style="width: 60px;">工序编号</th>
<th style="width: 80px;">工序名称</th>
<th style="width: 140px;">验收单号</th>
<th style="width: 60px;">加工单价</th>
<th style="width: 80px;">加工部门</th>
<th style="width: 60px;">验收数</th>
<th style="width: 60px;">合格数</th>
<th style="width: 60px;">不合格数</th>
<th style="width: 100px; text-align: center;">条形码</th>
<th style="width: 60px; text-align: center;">状态</th>
<th style="width: 80px; text-align: center;">操作</th>
</tr>
</thead>
<tbody id="procedureBody">
{{#each machinChildList}}
<tr>
<td>{{procedureMation.number}}</td>
<td>{{procedureMation.name}}</td>
<td>{{oddNumber}}</td>
<td>{{procedureMation.unitPrice}}</td>
<td>{{procedureMation.departmentMation.name}}</td>
<td>{{acceptNum}}</td>
<td>{{quantityNum}}</td>
<td>{{belowNum}}</td>
<td><img class="barCode" src="{{barCodeMation.imagePath}}" style="width: 150px;"/></td>
<td>{{{stateName}}}</td>
<td>{{{operator}}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/bean}}
</script>
<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('machinAccept');
</script>
</body>
</html>
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool,
form = layui.form;
var id = getNotUndefinedVal(GetUrlParam("id"));
textool.init({
eleId: 'barCode',
tools: ['copy', 'reset', 'clear']
});
matchingLanguage();
form.render();
form.on('submit(getBean)', function (data) {
if (winui.verifyForm(data.elem)) {
let params = {
id: id,
realNumber: $("#realNumber").val(),
profitNum: $("#profitNum").val(),
lossNum: $("#lossNum").val(),
}
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "complateInventoryChild", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
...@@ -9,15 +9,14 @@ layui.config({ ...@@ -9,15 +9,14 @@ layui.config({
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
var serviceClassName = sysServiceMation["inventoryOrder"]["key"];
authBtn('1720796297124');// 新增 authBtn('1718282987406');//新增
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
// 获取列表 url: sysMainMation.erpBasePath + 'queryInventoryList',
url: sysMainMation.erpBasePath + 'erpmachin001',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: true, page: true,
...@@ -25,42 +24,27 @@ layui.config({ ...@@ -25,42 +24,27 @@ layui.config({
limit: getLimit(), limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) { { field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>'; return '<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');
}},
{ 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) { { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 },
return getNotUndefinedVal(d.departmentMation?.name); { field: 'inventoryNum', title: '已盘点数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'allNum', 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: 'createName', rowspan: '2', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, { field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) {
{ field: 'createTime', rowspan: '2', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
{ 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: 300, toolbar: '#tableBar'}
], [
{ 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);
}}, }},
{ 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'}
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编", function () { initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}); });
} }
...@@ -69,20 +53,14 @@ layui.config({ ...@@ -69,20 +53,14 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'delete') { // 删除 if (layEvent === 'delete') { //删除
del(data); delet(data);
} else if (layEvent === 'details') { // 详情 } else if (layEvent === 'details') { //详情
details(data); details(data);
} else if (layEvent === 'edit') { // 编辑 } else if (layEvent === 'edit') { //编辑
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') { //撤销
...@@ -90,50 +68,12 @@ layui.config({ ...@@ -90,50 +68,12 @@ 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({
url: systemCommonUtil.getUrl('FP2023100300001', null), url: systemCommonUtil.getUrl('FP2024071800001', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType], title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "erpMachinAdd", pageId: "inventoryTaskListAdd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
...@@ -144,9 +84,9 @@ layui.config({ ...@@ -144,9 +84,9 @@ layui.config({
// 编辑 // 编辑
function edit(data) { function edit(data) {
_openNewWindows({ _openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300002&id=' + data.id, null), url: systemCommonUtil.getUrl('FP2024071800002&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType], title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "erpMachinEdit", pageId: "inventoryTaskListEdit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
...@@ -157,38 +97,39 @@ layui.config({ ...@@ -157,38 +97,39 @@ layui.config({
// 详情 // 详情
function details(data) { function details(data) {
_openNewWindows({ _openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null), url: systemCommonUtil.getUrl('FP2024071800003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails", pageId: "inventoryTaskListDetails",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
}}); }});
} }
// 删除 // 提交审批
function del(data) { function subApproval(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "deleteMachinById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 提交审批
function subApproval(data) {
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) { layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index); layer.close(index);
activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) { activitiUtil.startProcess(serviceClassName, null, function (approvalId) {
var params = { var params = {
id: data.id, id: data.id,
approvalId: approvalId approvalId: approvalId
}; };
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpmachin007", params: params, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "submitInventoryToApproval", params: params, type: 'json', method: 'POST', callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000}); winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
}
// 删除
function delet(data) {
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 + "deleteInventory", params: {id: data.id}, type: 'json', method: "POST", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
});
}); });
} }
...@@ -196,25 +137,26 @@ layui.config({ ...@@ -196,25 +137,26 @@ layui.config({
function revoke(data) { function revoke(data) {
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeMachin", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeInventory", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000}); winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
}); });
} }
form.render(); form.render();
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable(); loadTable();
}); });
function loadTable() { function loadTable() {
table.reloadData("messageTable", {where: getTableParams()}); table.reloadData("messageTable", {where: getTableParams()});
} }
function getTableParams(){ function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
} }
exports('erpMachinList', {}); exports('inventoryTaskList', {});
}); });
...@@ -9,47 +9,54 @@ layui.config({ ...@@ -9,47 +9,54 @@ layui.config({
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: sysMainMation.erpBasePath + 'erpmachin009', url: sysMainMation.erpBasePath + 'queryInventoryChildList',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: true, page: true,
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: '单号', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>'; 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}}, // { field: 'operatorId', title: '产品', rowspan: '2', align: 'center', width: 140 },
{ colspan: '3', title: '加工成品信息', align: 'center' }, // { field: 'normsId', title: '规格', rowspan: '2', align: 'center', width: 140 },
{ field: 'state', rowspan: '2', title: '状态', width: 90, templet: function (d) { // { field: 'depotId', title: '仓库', rowspan: '2', align: 'center', width: 140 },
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinStateEnum", 'id', d.state, 'name');
}}, { field: 'materialId', title: '产品名称', align: 'left', width: 150, templet: function (d) {
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, templet: function (d) { return getNotUndefinedVal(d.materialMation?.name);
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinPickStateEnum", 'id', d.pickState, 'name'); }},
}}, { field: 'normsId', title: '产品规格', align: 'left', width: 150, templet: function (d) {
{ colspan: '3', title: '加工信息', align: 'center' }, return getNotUndefinedVal(d.normsMation?.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: 'depotId', title: "仓库", align: 'left', width: 150, templet: function (d) {
{ field: 'lastUpdateName', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, return getNotUndefinedVal(d.depotMation?.name);
{ field: 'lastUpdateTime', rowspan: '2', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, }},
{ field: 'planStartTime', title: '计划开始时间', rowspan: '2', align: 'center', width: 140 },
{ field: 'planEndTime', title: '计划结束时间', rowspan: '2', align: 'center', width: 140 },
{ field: 'lossNum', title: '盘亏数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'realNumber', title: '实际盘点数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'profitNum', title: '盘盈数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'planNumber', title: '盘点总数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'type', title: '类型', width: 90, align: 'center', templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name');
}},
{ field: 'unitPrice', title: '单价', rowspan: '2', align: 'center', width: 140 },
{ 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: 200, 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 }
]], ]],
done: function(json) { done: function(json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编", function () { initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}); });
} }
...@@ -58,30 +65,17 @@ layui.config({ ...@@ -58,30 +65,17 @@ layui.config({
table.on('tool(messageTable)', function (obj) { table.on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'details') { // 详情 if (layEvent === 'complete') { //删除
details(data); complete(data);
} else if (layEvent === 'machinAccept') { //工序验收
machinAccept(data);
} }
}); });
// 详情 // 完成
function details(data) { function complete(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 工序验收
function machinAccept(data) {
_openNewWindows({ _openNewWindows({
url: "../../tpl/erpMachin/machinAccept.html?id=" + data.id, url: "../../tpl/inventoryTaskList/complateInventoryChild.html?id=" + data.id,
title: '工序验收', title: "盘点完成",
pageId: "machinAccept", pageId: "complateInventoryChild",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
...@@ -89,18 +83,18 @@ layui.config({ ...@@ -89,18 +83,18 @@ layui.config({
}}); }});
} }
form.render(); form.render();
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable(); loadTable();
}); });
function loadTable() { function loadTable() {
table.reloadData("messageTable", {where: getTableParams()}); table.reloadData("messageTable", {where: getTableParams()});
} }
function getTableParams(){ function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
} }
exports('erpDepartMachinList', {}); exports('inventoryTaskList', {});
}); });
...@@ -27,9 +27,8 @@ layui.config({ ...@@ -27,9 +27,8 @@ layui.config({
let params = { let params = {
parentId: parentId, parentId: parentId,
depotId: depotId, depotId: depotId,
// type: $("#type").val(), type: dataShowType.getData('type'),
type: $("#type input:radio:checked").val(), number: $("#number").val(),
number:$("#number").val(),
} }
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "batchGenerateDepotLevelVal", params: params, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.erpBasePath + "batchGenerateDepotLevelVal", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
......
var rowId = "";
var parentNode = null;
layui.config({ layui.config({
base: basePath, base: basePath,
version: skyeyeVersion version: skyeyeVersion
...@@ -78,7 +73,7 @@ layui.config({ ...@@ -78,7 +73,7 @@ layui.config({
]], ]],
done: function (json) { done: function (json) {
matchingLanguage(); matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入编号", function () { initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入编号", function () {
tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}); });
} }
......
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;
authBtn('1721305232197');
loadWareshop();
form.render();
var chooseWorkshopId = "";
function loadWareshop() {
table.render({
id: 'warehouseTable',
elem: '#warehouseTable',
method: 'get',
url: sysMainMation.erpBasePath + 'queryStaffBelongDepotList',
even: false,
page: false,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' },
{ field: 'name', title: '仓库', align: 'left', width: 150, templet: function (d) {
return '<a lay-event="select" class="notice-title-click">' + d.name + '</a>';
}}
]],
done: function(json) {
matchingLanguage();
depotId = "";
loadStaff("");
}
});
table.on('tool(warehouseTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent == 'select') {
depotId = data.id;
loadStaff(data.id);
}
});
}
function loadStaff(depotId) {
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryDepotStaffList',
where: {objectId: depotId},
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' },
{ field: 'jobNumber', title: '工号', align: 'left', width: 140, templet: function (d) {
return getNotUndefinedVal(d.staffMation?.jobNumber);
}},
{ field: 'userName', title: '姓名', width: 120, templet: function (d) {
return getNotUndefinedVal(d.staffMation?.userName);
}},
{ field: 'companyName', title: '企业', width: 150, templet: function (d) {
return getNotUndefinedVal(d.staffMation?.companyName);
}},
{ field: 'departmentName', title: '部门', width: 140, templet: function (d) {
return getNotUndefinedVal(d.staffMation?.departmentName);
}},
{ field: 'jobName', title: '职位', width: 140, templet: function (d) {
return getNotUndefinedVal(d.staffMation?.jobName);
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { // 删除
delet(data);
}
});
}
// 删除
function delet(data) {
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 + "deleteDepotStaffById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
table.reloadData("messageTable", {page: {curr: 1}, where: {objectId: depotId}})
}});
});
}
// 添加
$("body").on("click", "#addBean", function() {
if (isNull(depotId)) {
winui.window.msg('请先选择仓库信息.', {icon: 2, time: 2000});
return false;
}
systemCommonUtil.userStaffCheckType = true; // // 人员选择类型,1.多选;其他。单选
systemCommonUtil.checkStaffMation = []; // 选择时返回的对象
systemCommonUtil.openSysAllUserStaffChoosePage(function (checkStaffMation) {
var list = new Array();
console.log(checkStaffMation)
$.each(checkStaffMation, function (i, item) {
list.push(item.id);
});
console.log(list)
var params = {
depotId: depotId,
staffId: JSON.stringify(list)
};
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertDepotStaff", params: params, type: 'json', method: "POST", callback: function (json) {
loadStaff(depotId);
}});
});
});
exports('warehousePersonnel', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<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="" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">实际盘点数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="realNumber" name="realNumber" win-verify="required|number" placeholder="请输入实际盘点数量(实盘后的数量)" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">盘盈数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="profitNum" name="profitNum" win-verify="required|number" placeholder="请输入盘盈数量(实际盘点数量 - 计划盘点数量)" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="lossNum" name="lossNum" win-verify="required|number" placeholder="请输入盘亏数量(计划盘点数量 - 实际盘点数量)" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="getBean">完成</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/inventoryTaskList/'}).use('complateInventoryChild');
</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 class="winui-toolbar">
<div class="winui-tool">
<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>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1596958747047"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if (d.editRow == 1) { }}
{{# if (auth('1721375531678')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if (auth('1721375469094')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if (auth('1721375509306')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# } }}
{{# if (d.editRow == 2) { }}
{{# if (auth('1721375550109')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</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/inventoryTaskList/'}).use('inventoryTaskList');
</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 class="winui-toolbar">
<div class="winui-tool">
<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 (auth('1721394900190')) { }}
<a class="layui-btn layui-btn-xs" lay-event="complete">完成</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/inventoryTaskList/'}).use('myTaskInventoryList');
</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 style="background-color: rgb(242, 242, 242);">
<div class="layui-fluid">
<form class="layui-form" action="" id="showForm">
<div class="layui-col-xs12 margin-top-10 layui-col-space15">
<div class="layui-col-xs3">
<div class="layui-card">
<div class="layui-card-header">仓库</div>
<div class="layui-card-body">
<table id="warehouseTable" lay-filter="warehouseTable"></table>
</div>
</div>
</div>
<div class="layui-col-xs9">
<div class="layui-card">
<div class="layui-card-header">员工</div>
<div class="layui-card-body">
<div class="winui-toolbar">
<div class="winui-tool">
<button id="addBean" class="winui-toolbtn" auth="1721305257545" type="button"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1721305310416')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</div>
</div>
</div>
</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/warehousePersonnel/'}).use('warehousePersonnel');
</script>
</body>
</html>
\ No newline at end of file
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"allocationFormOrder": {"name": "调拨订单", "key": "com.skyeye.other.service.impl.AllocationServiceImpl"}, "allocationFormOrder": {"name": "调拨订单", "key": "com.skyeye.other.service.impl.AllocationServiceImpl"},
"depotOutOrder": {"name": "仓库出库单", "key": "com.skyeye.depot.service.impl.DepotOutServiceImpl"}, "depotOutOrder": {"name": "仓库出库单", "key": "com.skyeye.depot.service.impl.DepotOutServiceImpl"},
"depotPutOrder": {"name": "仓库入库单", "key": "com.skyeye.depot.service.impl.DepotPutServiceImpl"}, "depotPutOrder": {"name": "仓库入库单", "key": "com.skyeye.depot.service.impl.DepotPutServiceImpl"},
"inventoryOrder": {"name": "盘点任务单", "key": "com.skyeye.inventory.service.impl.InventoryServiceImpl"},
"putAcceptanceWarehousing": {"name": "验收入库单", "key": "com.skyeye.machin.service.impl.ErpAcceptanceReceiptServiceImpl"}, "putAcceptanceWarehousing": {"name": "验收入库单", "key": "com.skyeye.machin.service.impl.ErpAcceptanceReceiptServiceImpl"},
"machinHeader": {"name": "加工单", "key": "com.skyeye.machin.service.impl.ErpMachinServiceImpl"}, "machinHeader": {"name": "加工单", "key": "com.skyeye.machin.service.impl.ErpMachinServiceImpl"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册