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

feat:生产计划转整单委外

上级 cfa2c7c8
......@@ -14,39 +14,34 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var id = GetUrlParam("id");
var serviceClassName = sysServiceMation["materialReceiptForm"]["key"];
// 生产计划转整单委外
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryPatchOutLetTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryProductionTransWholeById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// 仓库出库的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024070100006', data, {
data.erpOrderItemList=data.productionChildList
$.each(data.erpOrderItemList, function(index, item){
item.unitPrice=item.normsMation.estimatePurchasePrice
item.taxRate=0
});
// 整单委外单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024071300003', data, {
savePreParams: function (params) {
params.farmId=data.farmId
params.departmentId=data.departmentId
params.salesman=data.salesman
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertPatchOutLetToTurnDepot", params: params, type: 'json', method: "POST", callback: function(json) {
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertProductionToWhole", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
loadComponentCallback: function () {
$("div[controlType='correspondentAllEnter']").remove();
$("div[controlType='depotOutFromType']").remove();
$("div[controlType='wholeOrderOutFromType']").remove();
},
tableAddRowCallback: function (tableId) {
$("#addRow" + tableId).remove();
$("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true);
$("div[controlType='simpleTable']").find(".amountOfMoney").prop('disabled', true);
$("div[controlType='simpleTable']").find(".taxRate").prop('disabled', true);
$("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(".chooseProductBtn").prop('disabled', true);
$("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
$("div[controlType='simpleTable']").find(".warehouse").prop('disabled', true);
}
});
}});
......
......@@ -11,6 +11,7 @@ layui.config({
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["wholeOut"]["key"];
// 新增
authBtn('1720835673573');
......@@ -34,16 +35,6 @@ layui.config({
}
return str;
}},
// { field: 'department', width: 150, title: '部门', align: 'center'},
// // { field: 'farmId', width: 150, title: '车间', align: 'center'},
//
// { field: 'farmId', title: '车间', align: 'left', width: 150, templet: function (d) {
// if (!isNull(d.farmMation)) {
// return d.farmMation.name;
// }
// return '';
// }},
//
{ field: 'operTime', width: 150, title: '单据日期', align: 'center'},
{ field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'center', width: 120 },
{ field: 'holderMation', title: '客户', rowspan: '2', align: 'center', width: 150, templet: function (d) {
......@@ -71,17 +62,23 @@ layui.config({
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
del(data, obj);
} else if (layEvent === 'edit') { //编辑
edit(data);
erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subApproval') { //提交审核
subApproval(data);
erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
revoke(data);
erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() {
loadTable();
});
}
});
......@@ -90,7 +87,7 @@ layui.config({
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300002', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "erpProductionAdd",
pageId: "wholeOutAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -103,7 +100,7 @@ layui.config({
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "erpProductionEdit",
pageId: "wholeOutEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -116,7 +113,7 @@ layui.config({
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300004&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpProductionDetail",
pageId: "wholeOutDetail",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
......@@ -133,34 +130,6 @@ layui.config({
});
}
// 提交审批
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 + "erpcommon006", 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 + "erpcommon003", 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();
......
......@@ -30,6 +30,7 @@
"returnMaterialPutList": {"name": "退料入库单", "key": "com.skyeye.pick.service.impl.ReturnPutServiceImpl"},
"materialReceiptForm": {"name": "物料接收单", "key": "com.skyeye.pickconfirm.service.impl.ConfirmPutServiceImpl"},
"materialReturnOrder": {"name": "物料退货单", "key": "com.skyeye.pickconfirm.service.impl.ConfirmReturnServiceImpl"},
"wholeOut": {"name": "整单委外单", "key": "com.skyeye.whole.service.impl.WholeOrderOutServiceImpl"},
"proworkLoad": {"name": "项目工作量审核", "key": "com.skyeye.service.impl.ProWorkloadServiceImpl"},
"proTask": {"name": "项目任务审核", "key": "com.skyeye.service.impl.ProTaskServiceImpl"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册