提交 7e67b74c 编写于 作者: doc_wei's avatar doc_wei

feat: 新增客户/供应商产品明细查看

上级 ea8e2b02
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;
// 关联的客户/供应商/会员购买或者出售的商品link的id
var id = getNotUndefinedVal(GetUrlParam("id"));
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryHolderNormsChildList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'normsCodeNum', title: '编码', align: 'left', width: 180, templet: function (d) {
return d.normsCodeNum;
}},
{ field: 'barCodeMation', title: '条形码', align: 'center', width: 150, templet: function (d) {
return '<img src="' + systemCommonUtil.getFilePath(d.normsCodeMation?.barCodeMation?.imagePath) + '" class="photo-img" lay-event="barCode" style="width: 100px">';
}},
{ field: 'state', title: '状态', align: 'center', width: 100, templet: function(d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("holderNormsChildState", 'id', d.state, 'name');
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 120, 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 === 'barCode') { // 条形码预览
systemCommonUtil.showPicImg(systemCommonUtil.getFilePath(data.normsCodeMation?.barCodeMation?.imagePath));
}
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
let params = {
holderId: id
}
return $.extend(true, params, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('holderNormsChildList', {});
});
......@@ -31,12 +31,21 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'materialId', title: '产品名称', align: 'left',width: 150, templet: function (d) {
{ field: 'materialId', title: '产品名称', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.materialMation?.name);
}},
{ field: 'normsId', title: '产品规格', align: 'left',width: 400, templet: function (d) {
{ field: 'normsId', title: '产品规格', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.normsMation?.name);
}}
}},
{ field: 'operNumber', title: '交易数量', align: 'center', width: 90, templet: function (d) {
let itemCode = d.materialMation?.itemCode;
if (itemCode == 1) {
// 一物一码
return '<a lay-event="details" class="notice-title-click">' + d.operNumber + '</a>';
}
return getNotUndefinedVal(d.operNumber);
}},
{ field: 'createTime', title: '交易时间', align: 'center', width: 150 }
]],
done: function(json) {
matchingLanguage();
......@@ -49,8 +58,22 @@ layui.config({
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { // 详情
details(data);
}
});
// 详情
function details(data) {
_openNewWindows({
url: '../../tpl/holder/holderNormsChildList.html?id=' + data.id,
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "holderNormsChildList",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
......
<!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>
</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/holder/'}).use('holderNormsChildList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -56,6 +56,7 @@
"orderItemQualityInspectionType": {"name": "ERP采购子单据质检类型", "className": "skyeye-erp#com.skyeye.business.classenum.OrderItemQualityInspectionType"},
"orderArrivalState": {"name": "采购订单到货状态", "className": "skyeye-erp#com.skyeye.purchase.classenum.OrderArrivalState"},
"holderNormsChildState": {"name": "关联的客户/供应商/会员购买或者出售的商品子信息状态", "className": "skyeye-erp#com.skyeye.holder.classenum.HolderNormsChildState"},
"purchaseOrderFromType": {"name": "采购订单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseOrderFromType"},
"purchaseDeliveryFromType": {"name": "到货单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseDeliveryFromType"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册