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

feat:资产转资产采购单和退货单

上级 b1d994f8
......@@ -26,26 +26,38 @@ layui.config({
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>';
{ 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: 'title', title: '标题', width: 300 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
{ field: 'title', title: '标题', rowspan: '2',width: 300 },
{ 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: '状态', width: 90, templet: function (d) {
{ field: 'state', title: '状态', rowspan: '2',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'}
]],
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ 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], fixed: 'right', align: 'center', rowspan: '2',width: 200, toolbar: '#messageTableBar'}
],[
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("assetPurchasePutFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () {
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
......
......@@ -26,7 +26,7 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
......@@ -67,7 +67,11 @@ layui.config({
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销采购申请
revoke(data);
}
} else if (layEvent === 'turnAssetInventory') { //转资产采购入库单
turnAssetInventory(data);
} else if (layEvent === 'turnAssetProcurementReturn') { //转资产退货单
turnAssetProcurementReturn(data);
}
});
// 资产采购详情
......@@ -150,6 +154,32 @@ layui.config({
});
}
// 转资产采购入库
function turnAssetInventory(data) {
_openNewWindows({
url: "../../tpl/assetManagePurchase/turnAssetInventory.html?id=" + data.id,
title: "转资产采购入库",
pageId: "turnAssetInventory",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//转资产采购退货单
function turnAssetProcurementReturn(data){
parent._openNewWindows({
url: "../../tpl/assetManagePurchase/turnAssetProcurementReturn.html?id=" + data.id,
title: '转资产采购退货单',
pageId: "turnAssetProcurementReturn",
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();
......
// 以下两个参数开启团队权限时有值
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.admBasePath + "queryAssetPurchaseOrderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// 资产采购入库的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024070500002', data, {
savePreParams: function (params) {
params.fromId=data.oddNumber
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.admBasePath + "insertAssetPurchaseOrderToTurnPut", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
tableAddRowCallback: function (tableId) {
$("#addRow" + tableId).remove();
$("div[controlType='simpleTable']").find(".assetId").prop('disabled', true);
$("div[controlType='simpleTable']").find(".fromId").prop('disabled', true);
$("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true);
$("div[controlType='simpleTable']").find(".chooseAssetBtn").prop('disabled', true);
}
});
}});
});
\ No newline at end of file
// 以下两个参数开启团队权限时有值
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.admBasePath + "queryAssetPurchaseOrderTransById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
let data = json.bean;
// 资产采购退货单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2024070700002', data, {
savePreParams: function (params) {
params.fromId=data.oddNumber
},
saveData: function (params) {
// 保存数据
AjaxPostUtil.request({url: sysMainMation.admBasePath + "insertAssetPurchaseOrderToReturns", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
},
tableAddRowCallback: function (tableId) {
$("#addRow" + tableId).remove();
$("div[controlType='simpleTable']").find(".assetId").prop('disabled', true);
$("div[controlType='simpleTable']").find(".fromId").prop('disabled', true);
$("div[controlType='simpleTable']").find(".unitPrice").prop('disabled', true);
$("div[controlType='simpleTable']").find(".chooseAssetBtn").prop('disabled', true);
}
});
}});
});
\ No newline at end of file
......@@ -23,26 +23,40 @@ layui.config({
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>';
{ 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: 'title', title: '标题', width: 300 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
{ field: 'title', title: '标题', width: 300 ,rowspan: '2'},
{ 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: '状态', width: 90, templet: function (d) {
{ field: 'state', title: '状态', rowspan: '2',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'}
]],
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ 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], fixed: 'right', align: 'center', rowspan: '2',width: 200,toolbar: '#messageTableBar'}
],
[
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("assetPurchaseReturnFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}}
]
],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () {
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
......
......@@ -32,6 +32,15 @@
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
{{# if (d.state == 'pass' || d.state == 'partiallyCompleted') { }}
{{# if (auth('1720362868984')) { }}
<a class="layui-btn layui-btn-xs" lay-event="turnAssetInventory">转采购入库</a>
{{# } }}
{{# if (auth('1720363038492')) { }}
<a class="layui-btn layui-btn-xs" lay-event="turnAssetProcurementReturn">转采购退货单</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
<!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/assetManagePurchase/'}).use('turnAssetInventory');
</script>
</body>
</html>
\ No newline at end of file
<!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/assetManagePurchase/'}).use('turnAssetProcurementReturn');
</script>
</body>
</html>
\ No newline at end of file
......@@ -145,7 +145,7 @@
"clockInTime": {"name": "上班打卡状态", "className": "skyeye-checkwork#com.skyeye.checkwork.classenum.ClockInTime"},
"clockOutTime": {"name": "下班打卡状态", "className": "skyeye-checkwork#com.skyeye.checkwork.classenum.ClockOutTime"},
"purchaseOrderState": {"name": "资产采购订单状态", "className": "com.skyeye.eve.assets.classenum.PurchaseOrderStateEnum"},
"purchaseOrderState": {"name": "资产采购订单状态", "className": "skyeye-adm#com.skyeye.eve.assets.classenum.PurchaseOrderStateEnum"},
"assetReportState": {"name": "资产明细状态", "className": "skyeye-adm#com.skyeye.eve.assets.classenum.AssetReportState"},
"conferenceState": {"name": "会议室状态", "className": "skyeye-adm#com.skyeye.eve.conference.classenum.ConferenceState"},
"vehicleState": {"name": "车辆状态", "className": "skyeye-adm#com.skyeye.eve.vehicle.classenum.VehicleState"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册