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

修改转领料、补料退料的位置

上级 db60b995
......@@ -36,9 +36,6 @@ layui.config({
return str;
}},
{ 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) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
......@@ -48,11 +45,14 @@ layui.config({
{ field: 'pickState', rowspan: '2', title: '领料状态', align: 'left', width: 80, 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', 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: '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 },
{ 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) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("machinFromType", 'id', d.fromTypeId, 'name');
......@@ -86,6 +86,12 @@ layui.config({
revoke(data);
} else if (layEvent === 'gantt') { //甘特图
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({
}});
}
// 转领料单
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) {
_openNewWindows({
......
......@@ -18,7 +18,6 @@ layui.config({
// 加工单转领料单
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) {
......@@ -32,14 +31,9 @@ layui.config({
},
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);
}
});
}});
......
......@@ -18,7 +18,6 @@ layui.config({
// 加工单转退料单
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) {
......@@ -32,13 +31,9 @@ layui.config({
},
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);
}
});
......
......@@ -18,7 +18,6 @@ layui.config({
// 加工单转补料单
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) {
......@@ -32,13 +31,9 @@ layui.config({
},
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);
}
});
......
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;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'erpmachin009',
where: getTableParams(),
even: true,
page: true,
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' },
{ 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 },
{ 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) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { // 详情
details(data);
} else if (layEvent === 'machinAccept') { //工序验收
machinAccept(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) {
}});
}
// 工序验收
function machinAccept(data) {
_openNewWindows({
url: "../../tpl/erpMachin/machinAccept.html?id=" + data.id,
title: '工序验收',
pageId: "machinAccept",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams(){
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('erpDepartMachinList', {});
});
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 $ = layui.$,
form = layui.form,
table = layui.table;
authBtn('1720796297124');// 新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
// 获取列表
url: sysMainMation.erpBasePath + 'erpmachin001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ 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) {
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: 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);
}},
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单据编号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { // 删除
del(data);
} else if (layEvent === 'details') { // 详情
details(data);
} else if (layEvent === 'edit') { // 编辑
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') { //撤销
revoke(data);
}
});
// 转领料单
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({
url: systemCommonUtil.getUrl('FP2023100300001', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "erpMachinAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300002&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "erpMachinEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023100300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpMachinDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 删除
function del(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.close(index);
activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "erpmachin007", params: params, type: 'json', method: 'POST', callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
}
// 撤销
function revoke(data) {
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "revokeMachin", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams(){
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('erpMachinList', {});
});
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 @@
<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>
</script>
......
......@@ -23,7 +23,7 @@
<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');
layui.config({base: '../../js/departmentMachining/'}).use('processingToMaterialRequisition');
</script>
</body>
</html>
\ No newline at end of file
......@@ -23,7 +23,7 @@
<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');
layui.config({base: '../../js/departmentMachining/'}).use('processingToReturnMaterials');
</script>
</body>
</html>
\ No newline at end of file
......@@ -23,7 +23,7 @@
<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');
layui.config({base: '../../js/departmentMachining/'}).use('processingToSupplementMaterials');
</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">该数据仅展示已经由上级审批通过的部门加工单信息。</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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册