|
|
@ -86,8 +86,10 @@ |
|
|
|
|
|
|
|
|
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table> |
|
|
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table> |
|
|
<script id="currentTableBar" type="text/html"> |
|
|
<script id="currentTableBar" type="text/html"> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}" depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a> |
|
|
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}" |
|
|
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}" lay-on="applicationOut" >出库申请</a> |
|
|
depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a> |
|
|
|
|
|
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}" |
|
|
|
|
|
lay-on="applicationOut">出库申请</a> |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<!-- 用于计量单位的展示--> |
|
|
<!-- 用于计量单位的展示--> |
|
|
@ -97,8 +99,8 @@ |
|
|
</button> |
|
|
</button> |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<script id="changePlace" type="text/html" > |
|
|
<script id="changePlace" type="text/html"> |
|
|
<span style="display: none">{{d.placeKingdeeCode}}</span> |
|
|
<span >{{d.placeKingdeeCode}}</span> |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
@ -147,7 +149,7 @@ |
|
|
|
|
|
|
|
|
let reqForPublic = {}; |
|
|
let reqForPublic = {}; |
|
|
|
|
|
|
|
|
layui.use(['form', 'table', 'upload','util'], function () { |
|
|
layui.use(['form', 'table', 'upload', 'util'], function () { |
|
|
var $ = layui.jquery, |
|
|
var $ = layui.jquery, |
|
|
form = layui.form, |
|
|
form = layui.form, |
|
|
upload = layui.upload, |
|
|
upload = layui.upload, |
|
|
@ -206,20 +208,19 @@ |
|
|
{type: "checkbox", width: 50}, |
|
|
{type: "checkbox", width: 50}, |
|
|
{field: "code", title: '存货编码', width: 150, templet: '#materialCode'}, |
|
|
{field: "code", title: '存货编码', width: 150, templet: '#materialCode'}, |
|
|
{field: 'mname', width: 200, title: '物料名称'}, |
|
|
{field: 'mname', width: 200, title: '物料名称'}, |
|
|
{field: 'brand', width: 200, title: '品牌'}, |
|
|
{field: 'brand', width: 200, title: '品牌',hide:true}, |
|
|
{field: 'version', width: 200, title: '规格型号'}, |
|
|
{field: 'version', width: 200, title: '规格型号'}, |
|
|
{field: 'typeName', width: 200, title: '物料类型'}, |
|
|
{field: 'typeName', width: 200, title: '物料类型',hide:true}, |
|
|
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|
|
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|
|
{field: 'quantity', width: 200, title: '数量'}, |
|
|
{field: 'quantity', width: 200, title: '数量'}, |
|
|
{field: 'depositoryName', width: 200, title: '仓库名称'}, |
|
|
{field: 'depositoryName', width: 200, title: '仓库名称'}, |
|
|
{field: 'depositoryCode', width: 200, title: '仓库编码'}, |
|
|
{field: 'depositoryCode', width: 200, title: '仓库编码'}, |
|
|
// {title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
{title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
|
|
|
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, |
|
|
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, |
|
|
{field: 'price', title: '单价', width: 200, sort: true}, |
|
|
{field: 'price', title: '单价', width: 200, sort: true}, |
|
|
{field: 'amounts', title: '总金额', width: 200, sort: true}, |
|
|
{field: 'amounts', title: '总金额', width: 200, sort: true}, |
|
|
{field: 'texture', width: 200, title: '材质',}, |
|
|
{field: 'texture', width: 200, title: '材质',hide:true}, |
|
|
{field: 'iremark', width: 200, title: '备注',}, |
|
|
{field: 'iremark', width: 200, title: '备注',hide:true}, |
|
|
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} |
|
|
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
@ -254,17 +255,16 @@ |
|
|
{type: "checkbox", width: 50}, |
|
|
{type: "checkbox", width: 50}, |
|
|
{title: '存货编码', width: 150, templet: '#materialCode'}, |
|
|
{title: '存货编码', width: 150, templet: '#materialCode'}, |
|
|
{field: 'mname', width: 200, title: '物料名称'}, |
|
|
{field: 'mname', width: 200, title: '物料名称'}, |
|
|
{field: 'brand', width: 200, title: '品牌'}, |
|
|
{field: 'brand', width: 200, title: '品牌', hide: true}, |
|
|
{field: 'version', width: 200, title: '规格型号'}, |
|
|
{field: 'version', width: 200, title: '规格型号'}, |
|
|
{field: 'typeName', width: 200, title: '物料类型'}, |
|
|
{field: 'typeName', width: 200, title: '物料类型', hide: true}, |
|
|
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|
|
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, |
|
|
{field: 'quantity', width: 200, title: '数量'}, |
|
|
{field: 'quantity', width: 200, title: '数量'}, |
|
|
{field: 'depositoryName', width: 200, title: '仓库名称'}, |
|
|
{field: 'depositoryName', width: 200, title: '仓库名称'}, |
|
|
{field: 'depositoryCode', width: 200, title: '仓库编码'}, |
|
|
{field: 'depositoryCode', width: 200, title: '仓库编码', hide: true}, |
|
|
{title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
{title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, |
|
|
{field: 'warningCount', width: 200, title: '待过期数量', sort: true, hide: true}, |
|
|
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, |
|
|
{field: 'texture', width: 200, title: '材质', hide: true}, |
|
|
{field: 'texture', width: 200, title: '材质',}, |
|
|
|
|
|
{field: 'iremark', width: 200, title: '备注',}, |
|
|
{field: 'iremark', width: 200, title: '备注',}, |
|
|
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} |
|
|
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} |
|
|
] |
|
|
] |
|
|
@ -283,10 +283,6 @@ |
|
|
} |
|
|
} |
|
|
$.each(res['data'], function (i, j) { |
|
|
$.each(res['data'], function (i, j) { |
|
|
let jElement = j['warningCount']; |
|
|
let jElement = j['warningCount']; |
|
|
let placeCode = j['placeCode'].split(" "); |
|
|
|
|
|
let placeKingdeeCode = j['placeKingdeeCode'].split(" "); |
|
|
|
|
|
let depositoryId = j['depositoryId']; |
|
|
|
|
|
let mid = j['id']; |
|
|
|
|
|
if (jElement !== null && jElement !== undefined) { |
|
|
if (jElement !== null && jElement !== undefined) { |
|
|
let flag = (Number(jElement) !== 0); |
|
|
let flag = (Number(jElement) !== 0); |
|
|
if (flag) { |
|
|
if (flag) { |
|
|
@ -294,17 +290,6 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 所处库位 |
|
|
|
|
|
var placeCodeItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")").children()[10]; |
|
|
|
|
|
//计量单位 |
|
|
|
|
|
// 用于库位的添加 |
|
|
|
|
|
var aItem = placeCodeItem.childNodes[0]; |
|
|
|
|
|
// 用于计量单位的添加 |
|
|
|
|
|
for (let k = 0; k < placeKingdeeCode.length; k++) { |
|
|
|
|
|
if (placeKingdeeCode[k] !== "") { |
|
|
|
|
|
$(aItem).append('<button code=' + placeCode[k] + ' id=' + mid + ' class="layui-btn layui-btn-primary layui-btn-xs" onclick="changePlaceCode(this)" value=' + depositoryId + '>' + placeKingdeeCode[k] + '</button>') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
@ -364,7 +349,7 @@ |
|
|
} |
|
|
} |
|
|
reqForPublic = req; |
|
|
reqForPublic = req; |
|
|
//执行搜索重载 |
|
|
//执行搜索重载 |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
@ -404,12 +389,12 @@ |
|
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
|
|
time: 500 //1秒关闭(如果不配置,默认是3秒) |
|
|
}, function () { |
|
|
}, function () { |
|
|
//执行搜索重载 |
|
|
//执行搜索重载 |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
}, |
|
|
}, |
|
|
where:reqForPublic |
|
|
where: reqForPublic |
|
|
}, 'data'); |
|
|
}, 'data'); |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
@ -418,12 +403,12 @@ |
|
|
time: 200, |
|
|
time: 200, |
|
|
}, function () { |
|
|
}, function () { |
|
|
//执行搜索重载 |
|
|
//执行搜索重载 |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
}, |
|
|
}, |
|
|
where:reqForPublic |
|
|
where: reqForPublic |
|
|
}, 'data'); |
|
|
}, 'data'); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -494,7 +479,7 @@ |
|
|
|
|
|
|
|
|
// 事件 |
|
|
// 事件 |
|
|
util.on('lay-on', { |
|
|
util.on('lay-on', { |
|
|
'applicationIn': function(obj){ |
|
|
'applicationIn': function (obj) { |
|
|
let mid = $(obj).attr('mid'); |
|
|
let mid = $(obj).attr('mid'); |
|
|
let depositoryId = $(obj).attr('depository'); |
|
|
let depositoryId = $(obj).attr('depository'); |
|
|
layer.open({ |
|
|
layer.open({ |
|
|
@ -503,13 +488,13 @@ |
|
|
anim: 'slideLeft', // 从右往左 |
|
|
anim: 'slideLeft', // 从右往左 |
|
|
area: ['40%', '100%'], |
|
|
area: ['40%', '100%'], |
|
|
shade: 0.1, |
|
|
shade: 0.1, |
|
|
title:"入库申请", |
|
|
title: "入库申请", |
|
|
shadeClose: true, |
|
|
shadeClose: true, |
|
|
id: 'ID-demo-layer-direction-r', |
|
|
id: 'ID-demo-layer-direction-r', |
|
|
content: '/application_in_back?mid=' +mid + "&depositoryId=" + depositoryId |
|
|
content: '/application_in_back?mid=' + mid + "&depositoryId=" + depositoryId |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
'applicationOut': function(obj){ |
|
|
'applicationOut': function (obj) { |
|
|
let code = $(obj).attr('code'); |
|
|
let code = $(obj).attr('code'); |
|
|
let depositoryId = $(obj).attr('depository'); |
|
|
let depositoryId = $(obj).attr('depository'); |
|
|
layer.open({ |
|
|
layer.open({ |
|
|
@ -518,10 +503,10 @@ |
|
|
anim: 'slideLeft', // 从右往左 |
|
|
anim: 'slideLeft', // 从右往左 |
|
|
area: ['40%', '100%'], |
|
|
area: ['40%', '100%'], |
|
|
shade: 0.1, |
|
|
shade: 0.1, |
|
|
title:"出库申请", |
|
|
title: "出库申请", |
|
|
shadeClose: true, |
|
|
shadeClose: true, |
|
|
id: 'ID-demo-layer-direction-r', |
|
|
id: 'ID-demo-layer-direction-r', |
|
|
content: '/application_out_back?code=' + code+ "&depositoryId=" + depositoryId |
|
|
content: '/application_out_back?code=' + code + "&depositoryId=" + depositoryId |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -553,12 +538,12 @@ |
|
|
}, |
|
|
}, |
|
|
end: function () { |
|
|
end: function () { |
|
|
//执行搜索重载 |
|
|
//执行搜索重载 |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
} |
|
|
} |
|
|
, where:reqForPublic |
|
|
, where: reqForPublic |
|
|
}, 'data'); |
|
|
}, 'data'); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -690,12 +675,12 @@ |
|
|
layer.close(indexForMsg); |
|
|
layer.close(indexForMsg); |
|
|
layer.close(loading2); |
|
|
layer.close(loading2); |
|
|
closeShowDataMessage(); |
|
|
closeShowDataMessage(); |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
}, |
|
|
}, |
|
|
where:reqForPublic |
|
|
where: reqForPublic |
|
|
}, 'data'); |
|
|
}, 'data'); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -766,12 +751,12 @@ |
|
|
content: '/InventoryView?id=' + obj.id, |
|
|
content: '/InventoryView?id=' + obj.id, |
|
|
end: function () { |
|
|
end: function () { |
|
|
//执行搜索重载 |
|
|
//执行搜索重载 |
|
|
table.reload('currentTableId', { |
|
|
table.reloadData('currentTableId', { |
|
|
url: '/material/findInventory', |
|
|
url: '/material/findInventory', |
|
|
page: { |
|
|
page: { |
|
|
curr: 1 |
|
|
curr: 1 |
|
|
}, |
|
|
}, |
|
|
where:reqForPublic |
|
|
where: reqForPublic |
|
|
}, 'data'); |
|
|
}, 'data'); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|