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

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

上级 b3ce84f0
......@@ -4,33 +4,82 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool'], function (exports) {
}).define(['window', 'jquery', 'winui','tableSelect', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool,
form = layui.form;
var id = getNotUndefinedVal(GetUrlParam("id"));
textool.init({
eleId: 'barCode',
tools: ['copy', 'reset', 'clear']
});
tableSelect = layui.tableSelect;
var id = GetUrlParam("id");
showGrid({
id: "showForm",
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) {
}
});
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)) {
let params = {
id: id,
realNumber: $("#realNumber").val(),
profitNum: $("#profitNum").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.refreshCode = '0';
}});
}
});
}
return false;
});
......
......@@ -13,7 +13,7 @@ layui.config({
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
method: 'POST',
url: sysMainMation.erpBasePath + 'queryInventoryChildList',
where: getTableParams(),
even: true,
......@@ -25,10 +25,6 @@ layui.config({
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
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) {
return getNotUndefinedVal(d.materialMation?.name);
}},
......@@ -38,7 +34,6 @@ layui.config({
{ field: 'depotId', title: "仓库", align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.depotMation?.name);
}},
{ field: 'planStartTime', 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 },
......@@ -46,7 +41,7 @@ layui.config({
{ field: 'profitNum', 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) {
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) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("materialNormsCodeType", 'id', d.type, 'name');
......@@ -83,7 +78,6 @@ layui.config({
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
......@@ -96,5 +90,5 @@ layui.config({
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('inventoryTaskList', {});
exports('myTaskInventoryList', {});
});
......@@ -7,27 +7,101 @@
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" autocomplete="off">
<form class="layui-form" action="" autocomplete="off" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<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 ver-center">
{{materialMation.name}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">规格</label>
<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 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"/>
<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">盘盈数量<i class="red">*</i></label>
<label class="layui-form-label">盘盈数量</label>
<div class="layui-input-block">
<input type="text" id="profitNum" name="profitNum" win-verify="required|number" placeholder="请输入盘盈数量(实际盘点数量 - 计划盘点数量)" class="layui-input"/>
<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">数量<i class="red">*</i></label>
<label class="layui-form-label">盘亏数量</label>
<div class="layui-input-block">
<input type="text" id="lossNum" name="lossNum" win-verify="required|number" placeholder="请输入盘亏数量(计划盘点数量 - 实际盘点数量)" class="layui-input"/>
<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>
......@@ -37,8 +111,8 @@
<button class="winui-btn" lay-submit lay-filter="getBean">完成</button>
</div>
</div>
</form>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
......
......@@ -15,9 +15,11 @@
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if (d.state == '3') { }}
{{# if (auth('1721394900190')) { }}
<a class="layui-btn layui-btn-xs" lay-event="complete">完成</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
......@@ -33,6 +33,9 @@ layui.config({
{ field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) {
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: 'allPrice', title: '总金额', width: 100, align: 'left' },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
......
......@@ -56,7 +56,7 @@ layui.define(['table', 'jquery', 'form'], function (exports) {
setChecked(res, curr, count);
tableDone(res, curr, count);
};
opt.table.where = {};
opt.table.where = isNull(opt.where) ? {} : opt.where;
opt.table.where[opt.searchKey] = '';
var tableSelect_table = table.render(opt.table);
......
......@@ -227,6 +227,7 @@
"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"},
"purchaseRequestInquiryState": {"name": "ERP-采购申请单询价状态", "className": "skyeye-erp#com.skyeye.request.classenum.PurchaseRequestInquiryState"},
"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.
先完成此消息的编辑!
想要评论请 注册