update“:转生产计划的数据回显

上级 85cef2d3
......@@ -28,23 +28,29 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' },
{ field: 'oddNumber', title: '单号', align: 'center', rowspan: '2', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
{ field: 'oddNumber', title: '单号', rowspan: '2', align: 'left', width: 220, 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: 'operTime', width: 150, title: '单据日期', rowspan: '2',align: 'center'},
{ field: 'name', title: '产品名称', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
{ field: '---', width: 150, align: 'center', rowspan: '2',title: '规格'},
{ field: '---', width: 150, align: 'center', rowspan: '2',title: '交货日期'},
{ field: '---', width: 150, align: 'center', rowspan: '2',title: '数量'},
{ field: 'processInstanceId', title: '流程ID', rowspan: '2',width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', rowspan: '2',width: 120 },
{ 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: 120 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', rowspan: '2',width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
],[
{ field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sealOutLetFromType", 'id', d.fromTypeId, 'name');
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionPlanFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', rowspan: '2',width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
......
......@@ -18,11 +18,10 @@ layui.config({
// 预生产计划 转 生产计划
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryProductionPlanTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
console.log(5555,data)
// 因为要调生产计划的编辑布局,所以把预生产计划里的productionPlanChildList给到生产计划里的productionChildList
data.productionChildList = data.productionPlanChildList
// 生产计划的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023092200002', data, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertProductionPlanToProduction", params: params, type: 'json', method: "POST", callback: function(json) {
......@@ -31,18 +30,18 @@ layui.config({
}});
},
// 移除来源单据
loadComponentCallback: function () {
$("div[controlType='productionFromType']").remove();
},
// 新增行的回调函数
// tableAddRowCallback: function (tableId) {
// $("#addRow" + tableId).remove();
// $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
// $("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(".specifications").prop('disabled', true);
// }
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
......@@ -27,22 +27,29 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers' },
{ field: 'oddNumber', title: '单号', align: 'center', rowspan: '2', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'processInstanceId', title: '流程ID', width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
{ field: 'oddNumber', title: '单号', rowspan: '2', align: 'left', width: 220, 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: 'operTime', width: 150, title: '单据日期', rowspan: '2',align: 'center'},
{ field: 'name', title: '产品名称', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
{ field: 'salesOrderNum', width: 100, title: '生产类型', rowspan: '2',align: 'center', templet: function (d) {return isNull(d.sealOrderMation) ? '' : d.sealOrderMation.oddNumber}},
{ field: 'name', title: 'bom方案', align: 'left',rowspan: '2',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
{ field: '---', width: 150, align: 'center', rowspan: '2',title: '交货日期'},
{ field: 'processInstanceId', title: '流程ID', rowspan: '2',width: 280, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', rowspan: '2',width: 120 },
{ 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: 120 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', rowspan: '2',width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
],[
{ field: 'fromTypeId', title: '来源类型', rowspan: '2',width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sealOutLetFromType", 'id', d.fromTypeId, 'name');
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', rowspan: '2',width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
......
......@@ -110,44 +110,44 @@ layui.config({
}});
}
// // 删除
// function del(data, obj) {
// 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 + "deleteProductionById", 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 del(data, obj) {
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 + "erpcommon005", 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 + "erpproduction007", params: params, type: 'json', method: 'POST', callback: function (json) {
// winui.window.msg("提交成功", {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 + "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 + "revokeProduction", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", 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() {
......
......@@ -17,19 +17,19 @@
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.editRow == 1) { }}
{{# if(auth('1720705286166')) { }}
{{# if(auth('1721036771903')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1590913527206')) { }}
{{# if(auth('1720835673573')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1590926876459')) { }}
{{# if(auth('1721036781887')) { }}
<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('1696246760629')) { }}
{{# if(auth('1721036798487')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
......
......@@ -15,10 +15,9 @@ layui.config({
var $ = layui.$;
var id = GetUrlParam("id");
// 销售订单转销售出库
// 销售订单转销售退货
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "querySealsOrderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
console.log(5555,data)
// 销售退货的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023042700006', data, {
savePreParams: function (params) {
......
......@@ -32,31 +32,16 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
{{# if(d.state == 'pass' ) { }}
{{# if(d.state == 'pass' || d.state == 'partiallyCompleted') { }}
{{# if(auth('1571813426889')){ }}
<a class="layui-btn layui-btn-xs" lay-event="turnSales">转销售出库</a>
{{# } }}
{{# } }}
{{# if(d.state == 'partiallyCompleted') { }}
{{# if(auth('1571813426889')){ }}
<a class="layui-btn layui-btn-xs" lay-event="turnSales">转销售出库</a>
{{# } }}
{{# } }}
{{# if(d.state == 'pass') { }}
{{# if(auth('1720343655250')){ }}
<a class="layui-btn layui-btn-xs" lay-event="turnReturns">转销售退货</a>
{{# } }}
{{# } }}
{{# if(d.state == 'partiallyCompleted') { }}
{{# if(d.state == 'pass' || d.state == 'partiallyCompleted') { }}
{{# if(auth('1720343655250')){ }}
<a class="layui-btn layui-btn-xs" lay-event="turnReturns">转销售退货</a>
{{# } }}
{{# } }}
<!-- {{# if(d.state == 'partiallyCompleted') { }}-->
<!-- {{# if(auth('')){ }}-->
<!-- <a class="layui-btn layui-btn-xs" lay-event="turnReturns">转预生产计划</a>-->
<!-- {{# } }}-->
<!-- {{# } }}-->
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册