提交 441c0830 编写于 作者: W WJ-202301081617\Wlos

Merge branch 'company_server' of https://gitee.com/doc_wei01/skyeye into company_server

......@@ -24,24 +24,37 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据编号', align: 'center', width: 180, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'machinMation', rowspan: '2', title: '加工单', align: 'center', width: 200, templet: function (d) {return isNull(d.machinMation) ? '' : d.machinMation.oddNumber}},
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'totalPrice', title: '物料合计', align: 'left', width: 100 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 150 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar' }
{ 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;
}},
{ field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 },
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function (d) {
return '<a lay-event="processDetails" 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: 'otherState', title: '入库状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("putState", 'id', d.otherState, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 },
{ 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'}
], [
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("pickFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}}
]],
done: function(json) {
matchingLanguage();
......@@ -64,11 +77,26 @@ layui.config({
subApproval(data);
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
} else if (layEvent === 'turnReturnMaterialToPut') { //转退料入库
turnReturnMaterialToPut(data);
}else if (layEvent === 'revoke') { //撤销
revoke(data);
}
});
// 转退料入库
function turnReturnMaterialToPut(data) {
_openNewWindows({
url: "../../tpl/erpPick/turnReturnMaterialToPut.html?id=" + data.id,
title: "",
pageId: "turnReturnMaterialToPut",
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({
......
// 以下两个参数开启团队权限时有值
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 + "queryReturnMaterialTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
data.erpOrderItemList=data.pickChildList
$.each(data.erpOrderItemList, function(index, item){
item.operNumber=item.needNum
item.unitPrice=item.normsMation.estimatePurchasePrice
item.taxRate=0
});
console.log(data.erpOrderItemList)
// 退料入库的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024071200012', data, {
savePreParams: function (params) {
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertReturnMaterialToTurnOut", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
loadComponentCallback: function () {
$("select[attrkey='departmentId']").prop('disabled', true);
$("select[attrkey='farmId']").prop('disabled', true);
$("div[controlType='requisitionOutLetFromType']").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);
}
});
}});
});
\ No newline at end of file
var rowId = "";
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('1720835673573');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryWholeOrderOutList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '生产单号', align: 'center', width: 200, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'salesOrderNum', width: 200, title: '关联销售单', align: 'center', templet: function (d) {return isNull(d.sealOrderMation) ? '' : d.sealOrderMation.oddNumber}},
{ field: 'name', title: '产品名称', align: 'left',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.name}},
{ field: 'model', title: '产品型号', align: 'left',width: 150, templet: function (d) {return isNull(d.materialMation) ? '' : d.materialMation.model}},
{ field: 'norms', title: '产品规格', align: 'left',width: 150, templet: function (d) {return isNull(d.normsMation) ? '' : d.normsMation.name}},
{ field: 'number', width: 100, title: '计划生产数量'},
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}},
{ field: 'planStartDate', width: 150, align: 'center', title: '计划开始时间'},
{ field: 'planComplateDate', width: 150, align: 'center', title: '计划结束时间'},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'}
]],
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, obj);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'subApproval') { //提交审核
subApproval(data);
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
revoke(data);
}
});
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024071300002', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "erpProductionAdd",
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('FP2024071300003&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "erpProductionEdit",
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('FP2024071300004&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "erpProductionDetail",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// // 删除
// 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 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 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();
// }});
// });
// }
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('wholeOutList', {});
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
......@@ -34,6 +34,13 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
{{# if (d.state == 'pass') { }}
{{# if (d.otherState == 1 ||d.otherState == 2) { }}
{{# if (auth('1720873016087')) { }}
<a class="layui-btn layui-btn-xs" lay-event="turnReturnMaterialToPut">转退料入库</a>
{{# } }}
{{# } }}
{{# } }}
</script>
</div>
......
<!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 id="content"></div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" type="button" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formSaveDraft" id="formSaveDraft">保存为草稿</button>`
<button class="winui-btn" lay-submit lay-filter="formWriteBean" id="formWriteBean">提交</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/erpPick/'}).use('turnReturnMaterialToPut');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
<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="1590913527206"><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('1720705286166')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1590913527206')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1590926876459')) { }}
<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')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</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/wholeOut/'}).use('wholeOutList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -85,8 +85,9 @@ function inTableDataArrayByAssetarId(materialId, unitId, array) {
* @param allChooseProduct 商品对象
* @param unitPriceKey 单价显示的key,不用的单据类型展示不同的商品价格类型(零售价,最低售价,销售价等)
* @param calcPriceCallback 计算价格回调的函数
* @param callback 变化回调函数
*/
function mUnitChangeEvent(form, allChooseProduct, unitPriceKey, calcPriceCallback) {
function mUnitChangeEvent(form, allChooseProduct, unitPriceKey, calcPriceCallback, callback) {
// 商品规格加载变化事件
form.on('select(selectUnitProperty)', function(data) {
var thisRowValue = data.value;
......@@ -101,6 +102,9 @@ function mUnitChangeEvent(form, allChooseProduct, unitPriceKey, calcPriceCallbac
var unitPrice = parseFloat(bean[unitPriceKey]).toFixed(2);
$("#unitPrice" + thisRowKey).val(unitPrice);
$("#amountOfMoney" + thisRowKey).val((rkNum * parseFloat(unitPrice)).toFixed(2));
if (typeof callback == "function") {
callback(thisRowKey, bean);
}
return false;
}
});
......@@ -108,6 +112,9 @@ function mUnitChangeEvent(form, allChooseProduct, unitPriceKey, calcPriceCallbac
// 重置单价以及金额为空
$("#unitPrice" + thisRowKey).val("0.00");
$("#amountOfMoney" + thisRowKey).val("0.00");
if (typeof callback == "function") {
callback(thisRowKey, null);
}
}
var depotId = isNull($("#depotId").val()) ? "" : $("#depotId").val();
// 加载库存
......
......@@ -52,6 +52,7 @@
"machinStateEnum": {"name": "加工单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinStateEnum"},
"machinPickStateEnum": {"name": "加工单领料状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinPickStateEnum"},
"outLetState": {"name": "领料/补料单出库状态", "className": "skyeye-erp#com.skyeye.pick.classenum.OutLetState"},
"putState": {"name": "退料单入库状态", "className": "skyeye-erp#com.skyeye.pick.classenum.PutState"},
"machinChildStateEnum": {"name": "工序验收单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinChildStateEnum"},
"materialNormsCodeInDepot": {"name": "商品规格一物一码库存状态", "className": "skyeye-erp#com.skyeye.material.classenum.MaterialNormsCodeInDepot"},
"orderItemQualityInspectionType": {"name": "ERP采购子单据质检类型", "className": "skyeye-erp#com.skyeye.business.classenum.OrderItemQualityInspectionType"},
......@@ -83,6 +84,7 @@
"depotOutState": {"name": "仓库出库单出库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotOutState"},
"depotPutFromType": {"name": "仓库入库单来源单据类型", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutFromType"},
"depotPutState": {"name": "仓库入库单入库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutState"},
"productionChildFromType": {"name": "生产计划单子单据生产类型", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionChildType"},
"skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"widthScale": {"name": "宽度比例", "className": "skyeye-pro#com.skyeye.attr.classenum.WidthScale"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册