From a530f92d5dd55112ea23273c29495268fe4237da Mon Sep 17 00:00:00 2001
From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com>
Date: Sat, 20 Jul 2024 10:29:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AC=E9=A2=86=E6=96=99?=
=?UTF-8?q?=E3=80=81=E8=A1=A5=E6=96=99=E9=80=80=E6=96=99=E7=9A=84=E4=BD=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../departmentMachiningList.js | 52 ++++-
.../processingToMaterialRequisition.js | 6 -
.../processingToReturnMaterials.js | 5 -
.../processingToSupplementMaterials.js | 5 -
.../js/erpMachin/erpDepartMachinList.js | 106 ---------
.../js/erpMachin/erpMachinAcceptance.js | 92 --------
.../template/js/erpMachin/erpMachinList.js | 220 ------------------
.../erpMachinStateIsPassNoComplateChoose.js | 114 ---------
.../template/js/erpMachin/machinAccept.js | 53 -----
.../departmentMachiningList.html | 11 +
.../processingToMaterialRequisition.html | 2 +-
.../processingToReturnMaterials.html | 2 +-
.../processingToSupplementMaterials.html | 2 +-
.../tpl/erpMachin/erpDepartMachinList.html | 34 ---
.../tpl/erpMachin/erpMachinAcceptance.html | 56 -----
.../template/tpl/erpMachin/erpMachinList.html | 55 -----
.../erpMachinStateIsPassNoComplateChoose.html | 25 --
.../template/tpl/erpMachin/machinAccept.html | 76 ------
18 files changed, 62 insertions(+), 854 deletions(-)
rename erp-produce/src/main/resources/template/js/{erpMachin => departmentMachining}/processingToMaterialRequisition.js (79%)
rename erp-produce/src/main/resources/template/js/{erpMachin => departmentMachining}/processingToReturnMaterials.js (79%)
rename erp-produce/src/main/resources/template/js/{erpMachin => departmentMachining}/processingToSupplementMaterials.js (79%)
delete mode 100644 erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
delete mode 100644 erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js
delete mode 100644 erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
delete mode 100644 erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
delete mode 100644 erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js
rename erp-produce/src/main/resources/template/tpl/{erpMachin => departmentMachining}/processingToMaterialRequisition.html (91%)
rename erp-produce/src/main/resources/template/tpl/{erpMachin => departmentMachining}/processingToReturnMaterials.html (91%)
rename erp-produce/src/main/resources/template/tpl/{erpMachin => departmentMachining}/processingToSupplementMaterials.html (91%)
delete mode 100644 erp-produce/src/main/resources/template/tpl/erpMachin/erpDepartMachinList.html
delete mode 100644 erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinAcceptance.html
delete mode 100644 erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinList.html
delete mode 100644 erp-produce/src/main/resources/template/tpl/erpMachin/erpMachinStateIsPassNoComplateChoose.html
delete mode 100644 erp-produce/src/main/resources/template/tpl/erpMachin/machinAccept.html
diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js b/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js
index 5c1539868..6d114e736 100644
--- a/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js
+++ b/erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js
@@ -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 '' + getNotUndefinedVal(d.processInstanceId) + '';
}},
@@ -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({
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js
similarity index 79%
rename from erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js
rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js
index 55deabd0f..7b682d69c 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/processingToMaterialRequisition.js
+++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js
@@ -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);
-
}
});
}});
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js
similarity index 79%
rename from erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js
rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js
index b29ef5122..d9d82f547 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/processingToReturnMaterials.js
+++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js
@@ -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);
}
});
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js
similarity index 79%
rename from erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js
rename to erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js
index 1d3f3436e..dfca17fa6 100644
--- a/erp-produce/src/main/resources/template/js/erpMachin/processingToSupplementMaterials.js
+++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js
@@ -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);
}
});
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
deleted file mode 100644
index 4fa2f5147..000000000
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpDepartMachinList.js
+++ /dev/null
@@ -1,106 +0,0 @@
-
-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 '' + d.oddNumber + '';
- }},
- { 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', {});
-});
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js
deleted file mode 100644
index d5e307652..000000000
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinAcceptance.js
+++ /dev/null
@@ -1,92 +0,0 @@
-
-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
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
deleted file mode 100644
index 981caed2d..000000000
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinList.js
+++ /dev/null
@@ -1,220 +0,0 @@
-
-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 = '' + d.oddNumber + '';
- if (!isNull(d.fromId)) {
- str += '[转]';
- }
- return str;
- }},
- { colspan: '2', title: '来源单据信息', align: 'center' },
- { field: 'processInstanceId', rowspan: '2', title: '流程ID', width: 100, templet: function (d) {
- return '' + getNotUndefinedVal(d.processInstanceId) + '';
- }},
- { 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', {});
-});
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js b/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
deleted file mode 100644
index 1cb7ec3a0..000000000
--- a/erp-produce/src/main/resources/template/js/erpMachin/erpMachinStateIsPassNoComplateChoose.js
+++ /dev/null
@@ -1,114 +0,0 @@
-
-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 '' + d.oddNumber + '';
- }},
- { 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
diff --git a/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js b/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js
deleted file mode 100644
index f3e50fc1c..000000000
--- a/erp-produce/src/main/resources/template/js/erpMachin/machinAccept.js
+++ /dev/null
@@ -1,53 +0,0 @@
-
-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 = '';
- } else {
- item.operator = '';
- }
- }
- });
- $("#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
diff --git a/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html
index 464677d9c..fef71cfb5 100644
--- a/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html
+++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/departmentMachiningList.html
@@ -35,6 +35,17 @@
撤销
{{# } }}
{{# } }}
+ {{# if (d.state == 'pass') { }}
+ {{# if (auth('1721442458082')) { }}
+ 转领料单
+ {{# } }}
+ {{# if (auth('1721442482395')) { }}
+ 转补料单
+ {{# } }}
+ {{# if (auth('1721442499305')) { }}
+ 转退料单
+ {{# } }}
+ {{# } }}
甘特图
diff --git a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html
similarity index 91%
rename from erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html
rename to erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html
index df8ce0b1a..27b39dfab 100644
--- a/erp-produce/src/main/resources/template/tpl/erpMachin/processingToMaterialRequisition.html
+++ b/erp-produce/src/main/resources/template/tpl/departmentMachining/processingToMaterialRequisition.html
@@ -23,7 +23,7 @@