From f35c18a39c5bac909082afa23eabae197d1acdc2 Mon Sep 17 00:00:00 2001
From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com>
Date: Fri, 19 Jul 2024 17:08:41 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E8=BD=AC=E9=A2=84=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../js/materialCode/materialCodeReportList.js | 3 ++
.../template/js/salesOrder/salesOrderList.js | 17 ++++++-
.../js/salesOrder/salesOrderToOutlet.js | 6 +++
.../salesOrderToPreProductionPlan.js | 45 +++++++++++++++++++
.../js/salesOrder/salesOrderToReturns.js | 7 +++
.../tpl/salesOrder/salesOrderList.html | 5 +++
.../salesOrderToPreProductionPlan.html | 29 ++++++++++++
.../template/json/skyeyeClassEnum.json | 1 +
8 files changed, 112 insertions(+), 1 deletion(-)
create mode 100644 erp/src/main/resources/template/js/salesOrder/salesOrderToPreProductionPlan.js
create mode 100644 erp/src/main/resources/template/tpl/salesOrder/salesOrderToPreProductionPlan.html
diff --git a/erp/src/main/resources/template/js/materialCode/materialCodeReportList.js b/erp/src/main/resources/template/js/materialCode/materialCodeReportList.js
index 3b60369e4..b7bf4a6f7 100644
--- a/erp/src/main/resources/template/js/materialCode/materialCodeReportList.js
+++ b/erp/src/main/resources/template/js/materialCode/materialCodeReportList.js
@@ -47,6 +47,9 @@ layui.config({
{ field: 'barCodeMation', title: '条形码', align: 'center', width: 150, templet: function (d) {
return '';
}},
+ { field: 'type', title: '类型', align: 'center', width: 100, templet: function(d) {
+ return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name');
+ }},
{ field: 'inDepot', title: '状态', align: 'center', width: 100, templet: function(d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeInDepot", 'id', d.inDepot, 'name');
}},
diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderList.js b/erp/src/main/resources/template/js/salesOrder/salesOrderList.js
index 366165f8b..e2f11e21e 100644
--- a/erp/src/main/resources/template/js/salesOrder/salesOrderList.js
+++ b/erp/src/main/resources/template/js/salesOrder/salesOrderList.js
@@ -43,7 +43,7 @@ layui.config({
{ 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' }
+ { 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("purchaseOrderFromType", 'id', d.fromTypeId, 'name');
@@ -79,6 +79,8 @@ layui.config({
turnSales(data);
} else if (layEvent === 'turnReturns') { //转销售退货单
turnReturns(data);
+ }else if (layEvent === 'turnToPreProductionPlan') { //转预生产计划单
+ turnToPreProductionPlan(data);
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
@@ -151,6 +153,19 @@ layui.config({
}});
}
+ // 销售订单转预生产计划
+ function turnToPreProductionPlan(data) {
+ _openNewWindows({
+ url:"../../tpl/salesOrder/salesOrderToPreProductionPlan.html?id=" + data.id,
+ title: "转预生产计划",
+ pageId: "salesOrderToReturns",
+ 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();
diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderToOutlet.js b/erp/src/main/resources/template/js/salesOrder/salesOrderToOutlet.js
index c8ace998a..0cd9fba75 100644
--- a/erp/src/main/resources/template/js/salesOrder/salesOrderToOutlet.js
+++ b/erp/src/main/resources/template/js/salesOrder/salesOrderToOutlet.js
@@ -21,6 +21,8 @@ layui.config({
// 销售出库的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023042700002', data, {
savePreParams: function (params) {
+ params.holderId=data.holderId
+ params.holderKey=data.holderKey
},
saveData: function (params) {
// 保存数据
@@ -29,6 +31,9 @@ layui.config({
parent.refreshCode = '0';
}});
},
+ loadComponentCallback: function () {
+ $("div[controlType='sealOutLetFromType']").remove();
+ },
// 新增行的回调函数
tableAddRowCallback: function (tableId) {
@@ -40,6 +45,7 @@ layui.config({
$("div[controlType='simpleTable']").find(".taxMoney").prop('disabled', true);
$("div[controlType='simpleTable']").find(".taxUnitPrice").prop('disabled', true);
$("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true);
+ $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
}
});
}});
diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderToPreProductionPlan.js b/erp/src/main/resources/template/js/salesOrder/salesOrderToPreProductionPlan.js
new file mode 100644
index 000000000..aab9bc4e7
--- /dev/null
+++ b/erp/src/main/resources/template/js/salesOrder/salesOrderToPreProductionPlan.js
@@ -0,0 +1,45 @@
+
+// 以下两个参数开启团队权限时有值
+var objectId = '', objectKey = '';
+// 根据以下两个参数判断:工作流的判断是否要根据serviceClassName的判断
+var serviceClassName;
+
+layui.config({
+ base: basePath,
+ version: skyeyeVersion
+}).extend({
+ window: 'js/winui.window'
+}).define(['window', 'table', 'jquery'], function (exports) {
+ winui.renderColor();
+ var index = parent.layer.getFrameIndex(window.name);
+ var $ = layui.$;
+ var id = GetUrlParam("id");
+
+ // 销售订单转预生产计划
+ AjaxPostUtil.request({url: sysMainMation.erpBasePath + "querySealsOrderTransProductionPlanById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
+ let data = json.bean;
+ data.productionPlanChildList=data.erpOrderItemList
+ // 预生产计划的【编辑布局】
+ dsFormUtil.initEditPageForStatic('content', 'FP2024071100002', data, {
+ savePreParams: function (params) {
+ },
+ saveData: function (params) {
+ // 保存数据
+ AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertSealsOrderToProductionPlan", params: params, type: 'json', method: "POST", callback: function(json) {
+ parent.layer.close(index);
+ parent.refreshCode = '0';
+ }});
+ },
+ loadComponentCallback: function () {
+ $("div[controlType='sealOutLetFromType']").remove();
+ },
+
+ // 新增行的回调函数
+ tableAddRowCallback: function (tableId) {
+ $("#addRow" + tableId).remove();
+ $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
+ $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
+ }
+ });
+ }});
+});
\ No newline at end of file
diff --git a/erp/src/main/resources/template/js/salesOrder/salesOrderToReturns.js b/erp/src/main/resources/template/js/salesOrder/salesOrderToReturns.js
index 6b6ca1216..6484407dc 100644
--- a/erp/src/main/resources/template/js/salesOrder/salesOrderToReturns.js
+++ b/erp/src/main/resources/template/js/salesOrder/salesOrderToReturns.js
@@ -21,8 +21,11 @@ layui.config({
// 销售退货的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023042700006', data, {
savePreParams: function (params) {
+ params.holderId=data.holderId
+ params.holderKey=data.holderKey
},
saveData: function (params) {
+ console.log(params)
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertSealsOrderToSealsReturns", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
@@ -30,6 +33,10 @@ layui.config({
}});
},
+ loadComponentCallback: function () {
+ $("div[controlType='sealReturnFromType']").remove();
+ },
+
// 新增行的回调函数
tableAddRowCallback: function (tableId) {
$("#addRow" + tableId).remove();
diff --git a/erp/src/main/resources/template/tpl/salesOrder/salesOrderList.html b/erp/src/main/resources/template/tpl/salesOrder/salesOrderList.html
index ca9d7074e..77d65cf37 100644
--- a/erp/src/main/resources/template/tpl/salesOrder/salesOrderList.html
+++ b/erp/src/main/resources/template/tpl/salesOrder/salesOrderList.html
@@ -42,6 +42,11 @@
转销售退货
{{# } }}
{{# } }}
+ {{# if(d.state == 'pass' || d.state == 'partiallyCompleted') { }}
+ {{# if(auth('1721375510008')){ }}
+ 转预生产计划
+ {{# } }}
+ {{# } }}
diff --git a/erp/src/main/resources/template/tpl/salesOrder/salesOrderToPreProductionPlan.html b/erp/src/main/resources/template/tpl/salesOrder/salesOrderToPreProductionPlan.html
new file mode 100644
index 000000000..461b42f76
--- /dev/null
+++ b/erp/src/main/resources/template/tpl/salesOrder/salesOrderToPreProductionPlan.html
@@ -0,0 +1,29 @@
+
+
+