提交 194d872c 编写于 作者: doc_wei's avatar doc_wei

feat: 新增采购订单来源组件

上级 a88476f9
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;
var objectId = GetUrlParam("objectId");
if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
}
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'querySupplierContractList',
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: 'title', title: '合同名称', align: 'left', width: 300 },
{ field: 'oddNumber', title: '合同编号', align: 'left', width: 120 },
{ field: 'price', title: '合同金额(元)', align: 'left', width: 120 },
{ field: 'signingTime', title: '签约日期', align: 'center', width: 100 },
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("supplierContractStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', 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 },
]],
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++) {
// 只有审批通过、执行中的项目才可以进行选中
if (json.rows[i].state != 'executing' && json.rows[i].state != 'pass') {
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.supplierContractMation = 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, {objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('supplierContractChooseList', {});
});
\ 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 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/supplierContract/'}).use('chooseList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -56,6 +56,15 @@
"orderQualityInspectionType": {"name": "ERP采购质检类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.OrderQualityInspectionType"},
"orderItemQualityInspectionType": {"name": "ERP采购子单据质检类型", "className": "skyeye-erp#com.skyeye.business.classenum.OrderItemQualityInspectionType"},
"orderArrivalState": {"name": "采购订单到货状态", "className": "skyeye-erp#com.skyeye.purchase.classenum.OrderArrivalState"},
"purchaseOrderFromType": {"name": "采购订单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseOrderFromType"},
"purchaseDeliveryFromType": {"name": "到货单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseDeliveryFromType"},
"purchasePutFromType": {"name": "采购入库单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchasePutFromType"},
"purchaseReturnsFromType": {"name": "采购退货单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseReturnsFromType"},
"purchaseRequestFromType": {"name": "采购申请单来源单据类型", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestFromType"},
"supplierContractFromType": {"name": "供应商合同来源单据类型", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractFromType"},
"skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"widthScale": {"name": "宽度比例", "className": "skyeye-pro#com.skyeye.attr.classenum.WidthScale"},
"dsFormShowType": {"name": "组件展示类型", "className": "skyeye-pro#com.skyeye.attr.classenum.DsFormShowType"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册