提交 01ca4f93 编写于 作者: doc_wei's avatar doc_wei

feat: 新增采购申请单选择页面

上级 2c7a1fca
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table;
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryPurchaseRequestList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ type: 'radio', fixed: 'left'},
{ 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>';
}},
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'title', title: '单据主题', align: 'left', width: 120 },
{ field: 'fromTypeId', title: '单据来源', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'projectMation', title: '项目', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.projectMation?.name);
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'inquiryState', title: '询价状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestInquiryState", 'id', d.inquiryState, 'name');
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestStateEnum", '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: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
for (var i = 0; i < json.rows.length; i++) {
// 只有审批通过、执行中的项目才可以进行选中
let state = json.rows[i].state;
let inquiryState = json.rows[i].inquiryState;
if ((state == 'pass' && (inquiryState == 1 || inquiryState == 4)) ||
(state == 'partialProcurement' && (inquiryState == 1 || inquiryState == 4))) {
systemCommonUtil.disabledRow(json.rows[i].LAY_TABLE_INDEX, 'radio');
}
}
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('dblclick',function(){
var dubClick = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
if (!dubClick.find("input[type='radio']").prop("disabled")) {
dubClick.find("input[type='radio']").prop("checked", true);
form.render();
var chooseIndex = JSON.stringify(dubClick.data('index'));
var obj = json.rows[chooseIndex];
parent.purchaseRequestMation = obj;
parent.refreshCode = '0';
parent.layer.close(index);
}
});
$('#messageTable').next().find('.layui-table-body').find("table" ).find("tbody").children("tr").on('click',function(){
var click = $('#messageTable').next().find('.layui-table-body').find("table").find("tbody").find(".layui-table-hover");
if (!click.find("input[type='radio']").prop("disabled")) {
click.find("input[type='radio']").prop("checked", true);
form.render();
}
})
}
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('purchaseRequestChooseList', {});
});
\ No newline at end of file
......@@ -25,26 +25,26 @@ layui.config({
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>';
}},
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'title', title: '单据主题', align: 'left', width: 120 },
{ field: 'fromTypeId', title: '单据来源', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestFromType", 'id', d.fromTypeId, 'name');
}},
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'projectMation', title: '项目', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.projectMation?.name);
}},
return getNotUndefinedVal(d.projectMation?.name);
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'inquiryState', title: '询价状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestInquiryState", 'id', d.inquiryState, 'name');
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestStateEnum", 'id', d.state, 'name');
}},
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestInquiryState", 'id', d.inquiryState, 'name');
}},
{ field: 'state', title: '状态', width: 120, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseRequestStateEnum", '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 },
......
<!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-tip alert-info">
注意事项:<br/>
1. 双击指定行可选中数据<br/>
2. 只有【审核通过、部分转采购合同】并且【无需询价、定价完成】状态的采购申请单可以选择
</div>
<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>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</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/purchaseRequest/'}).use('chooseList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -103,6 +103,7 @@ var serviceMap = [
{"id": "sysMainMation.sealServiceBasePath", "name": "售后工单服务"},
{"id": "sysMainMation.autoBasePath", "name": "自动化服务"},
{"id": "sysMainMation.wallBasePath", "name": "表白墙服务"},
{"id": "sysMainMation.tmsBasePath", "name": "物流服务"},
]
function getRequestHeaders() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册