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

feat:仓库中的我的盘点任务和盘点任务单

上级 b3ce84f0
...@@ -4,33 +4,82 @@ layui.config({ ...@@ -4,33 +4,82 @@ layui.config({
version: skyeyeVersion version: skyeyeVersion
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool'], function (exports) { }).define(['window', 'jquery', 'winui','tableSelect', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
textool = layui.textool,
form = layui.form; form = layui.form;
var id = getNotUndefinedVal(GetUrlParam("id")); tableSelect = layui.tableSelect;
var id = GetUrlParam("id");
textool.init({ showGrid({
eleId: 'barCode', id: "showForm",
tools: ['copy', 'reset', 'clear'] url: sysMainMation.erpBasePath + "queryInventoryChildById",
params: {id: id},
method: 'GET',
pagination: false,
template: $("#beanTemplate").html(),
ajaxSendAfter:function (json) {
matchingLanguage();
form.render();
}
});
tableSelect.render({
elem: '#code', //定义输入框input对象
checkedKey: 'id', //表格的唯一键值,非常重要,影响到选中状态 必填
searchKey: 'keyword', //搜索输入框的name值 默认keyword
searchPlaceholder: '请输入编码', //搜索输入框的提示文字 默认关键词搜索
where: {objectId: id},
table: { //定义表格参数,与LAYUI的TABLE模块一致,只是无需再定义表格elem
url: sysMainMation.erpBasePath + 'queryInventoryChildCodeList',
method: 'post',
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'jobNumber', title: '员工工号', width: 100, templet: function (d) {
return '<a rowId="' + d.id + '" class="notice-title-click">' + d.jobNumber + '</a>';
}},
// { field: 'userName', title: '员工姓名', width: 100 },
// { field: 'userSex', title: '性别', width: 60, rowspan: '2', templet: function (d) {
// return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("sexEnum", 'id', d.userSex, 'name');
// }},
]]
},
done: function (elem, data) {
}
}); });
matchingLanguage();
form.render();
form.on('submit(getBean)', function (data) { form.on('submit(getBean)', function (data) {
if(isNull($("#profitNum").val()) ){
$("#profitNum").val(0);
}
if(isNull($("#lossNum").val())){
$("#lossNum").val(0);
}
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
let params = { let params = {
id: id, id: id,
realNumber: $("#realNumber").val(), realNumber: $("#realNumber").val(),
profitNum: $("#profitNum").val(), profitNum: $("#profitNum").val(),
lossNum: $("#lossNum").val(), lossNum: $("#lossNum").val(),
profitNormsCode: $("#profitNormsCode").val(),
lossNormsCode: $("#lossNormsCode").val(),
} }
AjaxPostUtil.request({url: sysMainMation.erpBasePath + "complateInventoryChild", params: params, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({
url: sysMainMation.erpBasePath + "complateInventoryChild",
params: params,
type: 'json',
method: 'POST',
callback: function (json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}}); }
});
} }
return false; return false;
}); });
......
...@@ -13,7 +13,7 @@ layui.config({ ...@@ -13,7 +13,7 @@ layui.config({
table.render({ table.render({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'POST',
url: sysMainMation.erpBasePath + 'queryInventoryChildList', url: sysMainMation.erpBasePath + 'queryInventoryChildList',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
...@@ -23,22 +23,17 @@ layui.config({ ...@@ -23,22 +23,17 @@ layui.config({
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) { { 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: 'operatorId', title: '产品', rowspan: '2', align: 'center', width: 140 },
// { field: 'normsId', title: '规格', rowspan: '2', align: 'center', width: 140 },
// { field: 'depotId', title: '仓库', rowspan: '2', align: 'center', width: 140 },
{ 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); return getNotUndefinedVal(d.materialMation?.name);
}}, }},
{ field: 'normsId', title: '产品规格', align: 'left', width: 150, templet: function (d) { { field: 'normsId', title: '产品规格', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.normsMation?.name); return getNotUndefinedVal(d.normsMation?.name);
}}, }},
{ field: 'depotId', title: "仓库", align: 'left', width: 150, templet: function (d) { { field: 'depotId', title: "仓库", align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.depotMation?.name); return getNotUndefinedVal(d.depotMation?.name);
}}, }},
{ field: 'planStartTime', title: '计划开始时间', rowspan: '2', align: 'center', width: 140 }, { field: 'planStartTime', title: '计划开始时间', rowspan: '2', align: 'center', width: 140 },
{ field: 'planEndTime', title: '计划结束时间', rowspan: '2', align: 'center', width: 140 }, { field: 'planEndTime', title: '计划结束时间', rowspan: '2', align: 'center', width: 140 },
{ field: 'lossNum', title: '盘亏数量', rowspan: '2', align: 'center', width: 140 }, { field: 'lossNum', title: '盘亏数量', rowspan: '2', align: 'center', width: 140 },
...@@ -46,11 +41,11 @@ layui.config({ ...@@ -46,11 +41,11 @@ layui.config({
{ field: 'profitNum', title: '盘盈数量', rowspan: '2', align: 'center', width: 140 }, { field: 'profitNum', title: '盘盈数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'planNumber', title: '盘点总数量', rowspan: '2', align: 'center', width: 140 }, { field: 'planNumber', title: '盘点总数量', rowspan: '2', align: 'center', width: 140 },
{ field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) { { field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("inventoryChildState", 'id', d.state, 'name');
}}, }},
{ field: 'type', title: '类型', width: 90, align: 'center', templet: function (d) { { field: 'type', title: '类型', width: 90, align: 'center', templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name');
}}, }},
{ field: 'unitPrice', title: '单价', rowspan: '2', align: 'center', width: 140 }, { field: 'unitPrice', title: '单价', rowspan: '2', align: 'center', width: 140 },
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]], ]],
...@@ -83,7 +78,6 @@ layui.config({ ...@@ -83,7 +78,6 @@ layui.config({
}}); }});
} }
form.render(); form.render();
$("body").on("click", "#reloadTable", function() { $("body").on("click", "#reloadTable", function() {
loadTable(); loadTable();
...@@ -96,5 +90,5 @@ layui.config({ ...@@ -96,5 +90,5 @@ layui.config({
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
} }
exports('inventoryTaskList', {}); exports('myTaskInventoryList', {});
}); });
...@@ -7,38 +7,112 @@ ...@@ -7,38 +7,112 @@
</head> </head>
<body> <body>
<div style="margin:0 auto;padding:20px;"> <div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" autocomplete="off"> <form class="layui-form" action="" autocomplete="off" id="showForm">
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6"> </form>
<label class="layui-form-label">实际盘点数量<i class="red">*</i></label> </div>
<div class="layui-input-block">
<input type="text" id="realNumber" name="realNumber" win-verify="required|number" placeholder="请输入实际盘点数量(实盘后的数量)" class="layui-input"/> <script type="text/x-handlebars-template" id="beanTemplate">
</div> {{#bean}}
</div> <div class="layui-form-item layui-col-xs12">
<div class="layui-form-item layui-col-xs6"> <span class="hr-title">基本信息</span><hr>
<label class="layui-form-label">盘盈数量<i class="red">*</i></label> </div>
<div class="layui-input-block"> <div class="layui-form-item layui-col-xs6">
<input type="text" id="profitNum" name="profitNum" win-verify="required|number" placeholder="请输入盘盈数量(实际盘点数量 - 计划盘点数量)" class="layui-input"/> <label class="layui-form-label">产品</label>
</div> <div class="layui-input-block ver-center">
</div> {{materialMation.name}}
<div class="layui-form-item layui-col-xs6"> </div>
<label class="layui-form-label">数量<i class="red">*</i></label> </div>
<div class="layui-input-block"> <div class="layui-form-item layui-col-xs6">
<input type="text" id="lossNum" name="lossNum" win-verify="required|number" placeholder="请输入盘亏数量(计划盘点数量 - 实际盘点数量)" class="layui-input"/> <label class="layui-form-label">规格</label>
</div> <div class="layui-input-block ver-center">
{{normsMation.name}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">仓库</label>
<div class="layui-input-block ver-center">
{{depotMation.name}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">计划开始时间</label>
<div class="layui-input-block ver-center">
{{planStartTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">计划结束时间</label>
<div class="layui-input-block ver-center">
{{planEndTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">类型</label>
<div class="layui-input-block ver-center">
{{type}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单价</label>
<div class="layui-input-block ver-center">
{{unitPrice}}
</div> </div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">计划数量</label>
<div class="layui-input-block ver-center">
{{planNumber}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">盘点信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">条形码</label>
<div class="layui-input-block">
<input type="text" id="code" name="code" placeholder="点击查看条形码" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">实际盘点数量<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="realNumber" name="realNumber" win-verify="required|number" placeholder="请输入实际盘点数量" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">盘盈数量</label>
<div class="layui-input-block">
<input type="text" id="profitNum" name="profitNum" placeholder="请输入盘盈数量" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">盘亏数量</label>
<div class="layui-input-block">
<input type="text" id="lossNum" name="lossNum" placeholder="请输入盘亏数量" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">盘盈条形码</label>
<div class="layui-input-block">
<textarea id="profitNormsCode" name="profitNormsCode" placeholder="请输入盘盈条形码" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">盘亏条形码</label>
<div class="layui-input-block">
<textarea id="lossNormsCode" name="lossNormsCode" placeholder="请输入盘亏条形码" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<div class="layui-input-block"> <div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button> <button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="getBean">完成</button> <button class="winui-btn" lay-submit lay-filter="getBean">完成</button>
</div>
</div> </div>
</form> </div>
</div> {{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
......
...@@ -17,20 +17,20 @@ ...@@ -17,20 +17,20 @@
<table id="messageTable" lay-filter="messageTable"></table> <table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar"> <script type="text/html" id="tableBar">
{{# if (d.editRow == 1) { }} {{# if (d.editRow == 1) { }}
{{# if (auth('1721375531678')) { }} {{# if (auth('1721375531678')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a> <a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }} {{# } }}
{{# if (auth('1721375469094')) { }} {{# if (auth('1721375469094')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a> <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }} {{# } }}
{{# if (auth('1721375509306')) { }} {{# if (auth('1721375509306')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a> <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }} {{# } }}
{{# } }} {{# } }}
{{# if (d.editRow == 2) { }} {{# if (d.editRow == 2) { }}
{{# if (auth('1721375550109')) { }} {{# if (auth('1721375550109')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a> <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }} {{# } }}
{{# } }} {{# } }}
</script> </script>
</div> </div>
......
...@@ -15,8 +15,10 @@ ...@@ -15,8 +15,10 @@
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table> <table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar"> <script type="text/html" id="tableBar">
{{# if (auth('1721394900190')) { }} {{# if (d.state == '3') { }}
<a class="layui-btn layui-btn-xs" lay-event="complete">完成</a> {{# if (auth('1721394900190')) { }}
<a class="layui-btn layui-btn-xs" lay-event="complete">完成</a>
{{# } }}
{{# } }} {{# } }}
</script> </script>
</div> </div>
......
...@@ -33,6 +33,9 @@ layui.config({ ...@@ -33,6 +33,9 @@ layui.config({
{ field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) { { field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}}, }},
{ field: 'otherState', title: '出库状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotOutState", 'id', d.otherState, 'name');
}},
{ field: 'applyTime', title: '申领日期', width: 100, align: 'center' }, { field: 'applyTime', title: '申领日期', width: 100, align: 'center' },
{ field: 'allPrice', title: '总金额', width: 100, align: 'left' }, { field: 'allPrice', title: '总金额', width: 100, align: 'left' },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
......
...@@ -56,7 +56,7 @@ layui.define(['table', 'jquery', 'form'], function (exports) { ...@@ -56,7 +56,7 @@ layui.define(['table', 'jquery', 'form'], function (exports) {
setChecked(res, curr, count); setChecked(res, curr, count);
tableDone(res, curr, count); tableDone(res, curr, count);
}; };
opt.table.where = {}; opt.table.where = isNull(opt.where) ? {} : opt.where;
opt.table.where[opt.searchKey] = ''; opt.table.where[opt.searchKey] = '';
var tableSelect_table = table.render(opt.table); var tableSelect_table = table.render(opt.table);
......
...@@ -227,6 +227,7 @@ ...@@ -227,6 +227,7 @@
"filterValue": "3,4" "filterValue": "3,4"
}, },
"inventoryChildState": {"name": "ERP-我的任务盘点状态", "className": "skyeye-erp#com.skyeye.inventory.classenum.InventoryChildState"},
"purchaseRequestChildInquiry": {"name": "ERP-申请单子单据明细是否询价", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestChildInquiry"}, "purchaseRequestChildInquiry": {"name": "ERP-申请单子单据明细是否询价", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestChildInquiry"},
"purchaseRequestInquiryState": {"name": "ERP-采购申请单询价状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestInquiryState"}, "purchaseRequestInquiryState": {"name": "ERP-采购申请单询价状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestInquiryState"},
"purchaseRequestStateEnum": {"name": "ERP-采购申请状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestStateEnum"}, "purchaseRequestStateEnum": {"name": "ERP-采购申请状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestStateEnum"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册