提交 725b773c 编写于 作者: W WJ-202301081617\Wlos

feat:资产退货

上级 dc18ee63
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;
var serviceClassName = sysServiceMation["assetPurchaseReturn"]["key"];
authBtn('1720321634977');//新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.admBasePath + 'queryAssetPurchaseReturnList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'title', title: '标题', width: 300 },
{ 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: '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: '#messageTableBar'}
]],
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 === 'edit') { //编辑退货申请
edit(data);
} else if (layEvent === 'subApproval') { //退货提交审批
subApproval(data);
} else if (layEvent === 'delete') { //退货删除
delet(data);
} else if (layEvent === 'processDetails') { //退货流程详情
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销退货申请
revoke(data);
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070700001', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "assetProcurementReturnAdd",
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('FP2024070700002&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "assetProcurementReturnEdit",
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('FP2024070700003&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "assetProcurementReturnDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 撤销退货申请
function revoke(data) {
var msg = '确认撤销该资产采购退货申请吗?';
layer.confirm(msg, { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.admBasePath + "revokeAssetPurchaseReturn", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
// 删除
function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.admBasePath + "deleteAssetPurchaseReturnById", 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(serviceClassName, null, function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: sysMainMation.admBasePath + "submitAssetPurchaseReturn", params: params, type: 'json', 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('assetProcurementReturnList', {});
});
<!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 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="1720321634977"><i class="fa fa-plus" aria-hidden="true"></i>资产采购退货申请</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
{{# if(d.editRow == '1'){ }}
{{# if(auth('1720321753024')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1720321670930')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删除</a>
{{# } }}
{{# if(auth('1720321634977')) { }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == '2') { }}
{{# if(auth('1720321731800')){ }}
<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/assetProcurementReturn/'}).use('assetProcurementReturnList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -46,6 +46,7 @@
"assetManageReturn": {"name": "资产归还", "key": "com.skyeye.eve.assets.service.impl.AssetReturnServiceImpl"},
"assetManagePurchase": {"name": "资产采购", "key": "com.skyeye.eve.assets.service.impl.AssetPurchaseServiceImpl"},
"assetManagePut": {"name": "资产采购入库", "key": "com.skyeye.eve.assets.service.impl.AssetPurchasePutServiceImpl"},
"assetPurchaseReturn": {"name": "资产采购退货", "key": "com.skyeye.eve.assets.service.impl.AssetPurchaseReturnServiceImpl"},
"assetArticlesUse": {"name": "用品领用", "key": "com.skyeye.eve.articles.service.impl.ArticlesUseServiceImpl"},
"assetArticlesPurchase": {"name": "用品采购", "key": "com.skyeye.eve.articles.service.impl.ArticlesPurchaseServiceImpl"},
"licenceManageRevert": {"name": "证照归还", "key": "com.skyeye.eve.licence.service.impl.LicenceApplyRevertServiceImpl"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册