Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warehouse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡懿
warehouse
Commits
19f5c764
Commit
19f5c764
authored
Feb 23, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yqdchina.com/huyi/warehouse
into zlt
parents
7d4714ab
b14e8f23
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
20 deletions
+155
-20
gridselect.tag
src/main/webapp/WEB-INF/tags/sys/gridselect.tag
+10
-2
shelvesselect.tag
src/main/webapp/WEB-INF/tags/sys/shelvesselect.tag
+64
-0
jeeplus.js
src/main/webapp/static/common/js/jeeplus.js
+38
-1
materialRequisitionDetail.jsp
...rehouse/materialrequisition/materialRequisitionDetail.jsp
+10
-10
materialRequisitionList.js
.../warehouse/materialrequisition/materialRequisitionList.js
+17
-5
storageDetail.jsp
...ebapp/webpage/modules/warehouse/storage/storageDetail.jsp
+16
-2
No files found.
src/main/webapp/WEB-INF/tags/sys/gridselect.tag
View file @
19f5c764
...
...
@@ -18,6 +18,7 @@
<%@ attribute name="validateMsg" type="java.lang.String" required="false" description="校验的未通过提示信息"%>
<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
<%@ attribute name="callback" type="java.lang.String" required="false" description="选择回调"%>
<%@ attribute name="iframeUrl" type="java.lang.String" required="false" description="iframe框架url"%>
<input id="${id}Id" name="${name}" type="hidden" value="${value}"/>
<div class="input-group" style="width: 100%">
<input id="${id}Name" name="${labelName }" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
...
...
@@ -68,8 +69,15 @@ $(document).ready(function(){
$("#${id}Id").val(ids.join(","));
$("#${id}Name").val(names.join(","));
if('${callback}' && window['${callback}']){
window['${callback}'](items);
if('${callback}'){
if(window['${callback}']){
window['${callback}'](items);
}
<c:if test="${not empty iframeUrl}">
if(jp.getFrameWindow('${iframeUrl}')['${callback}']){
jp.getFrameWindow('${iframeUrl}')['${callback}'](items, '${id}'.match(/\d+/g)[0]);
}
</c:if>
}
top.layer.close(index);//关闭对话框。
...
...
src/main/webapp/WEB-INF/tags/sys/shelvesselect.tag
0 → 100644
View file @
19f5c764
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/webpage/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
<%@ attribute name="name" type="java.lang.String" required="true" description="隐藏域名称(ID)"%>
<%@ attribute name="value" type="java.lang.String" required="false" description="隐藏域值(ID)"%>
<%@ attribute name="labelName" type="java.lang.String" required="fasle" description="输入框名称(Name)"%>
<%@ attribute name="labelValue" type="java.lang.String" required="false" description="输入框值(Name)"%>
<%@ attribute name="isMultiSelected" type="java.lang.Boolean" required="false" description="是否允许多选"%>
<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
<%@ attribute name="hideBtn" type="java.lang.Boolean" required="false" description="是否显示按钮"%>
<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
<%@ attribute name="dataMsgRequired" type="java.lang.String" required="false" description=""%>
<%@ attribute name="callback" type="java.lang.String" required="false" description="回调"%>
<%@ attribute name="iframeUrl" type="java.lang.String" required="false" description="iframe窗口"%>
<input id="${id}Id" name="${name}" class="${cssClass} form-control" type="hidden" value="${value}"/>
<div class="input-group" style="width:100%">
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
class="${cssClass}" style="${cssStyle}"/>
<span class="input-group-btn">
<button type="button" id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if> btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i>
</button>
<button type="button" id="${id}DelButton" class="close" data-dismiss="alert" style="position: absolute; top: 5px; right: 53px; z-index: 999; display: block;">×</button>
</span>
</div>
<label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
<script type="text/javascript">
$("#${id}Button, #${id}Name").click(function(){
// 是否限制选择,如果限制,设置为disabled
if ($("#${id}Button").hasClass("disabled")){
return true;
}
// 正常打开
jp.openShelvesSelectDialog(function(items){
if('${callback}'){
if(window['${callback}']){
window['${callback}'](items);
}
<c:if test="${not empty iframeUrl}">
var iframeWin = jp.getFrameWindow('${iframeUrl}');
if(iframeWin && iframeWin['${callback}']){
iframeWin['${callback}'](items, '${id}'.match(/\d+/g)[0]);
}
</c:if>
}
})
});
$("#${id}DelButton").click(function(){
// 是否限制选择,如果限制,设置为disabled
if ($("#${id}Button").hasClass("disabled")){
return true;
}
// 清除
$("#${id}Id").val("");
$("#${id}Name").val("");
$("#${id}Name").focus();
});
</script>
\ No newline at end of file
src/main/webapp/static/common/js/jeeplus.js
View file @
19f5c764
...
...
@@ -711,7 +711,44 @@ function delRow(obj, prefix){
*/
getParent
:
function
()
{
return
top
.
getActiveTab
()[
0
].
contentWindow
;
}
},
getFrame
:
function
(
URL
)
{
// 查找所有iframe包括多层嵌套的iframe
var
iframes
=
top
.
$
(
"iframe"
);
var
win
=
null
function
getIframeWin
(
currentIframe
){
var
win
=
null
;
if
(
currentIframe
.
attr
(
"src"
).
indexOf
(
URL
)
>
-
1
){
// 获取当前iframe的window对象
win
=
currentIframe
;
}
else
{
for
(
var
i
=
0
;
i
<
currentIframe
.
contents
().
find
(
"iframe"
).
length
;
i
++
){
win
=
getIframeWin
(
$
(
currentIframe
.
contents
().
find
(
"iframe"
)[
i
]));
if
(
win
){
break
;
}
}
if
(
win
){
return
win
;
}
}
return
win
;
}
for
(
var
i
=
0
;
i
<
iframes
.
length
;
i
++
){
win
=
getIframeWin
(
$
(
iframes
[
i
]));
if
(
win
){
break
;
}
}
return
win
},
getFrameWindow
:
function
(
URL
)
{
return
this
.
getFrame
(
URL
)[
0
].
contentWindow
},
}
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionDetail.jsp
View file @
19f5c764
...
...
@@ -92,20 +92,20 @@
}
},
{
field: '
ledgerInfo.amount
',
title: '
单价
',
field: '
receiver.name
',
title: '
领用人
',
formatter: function (value, row, index) {
return Mustache.render($("#
ledgerInfoAmount
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
return Mustache.render($("#
receiver
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
}
},
{
field: 're
ceiver.name
',
title: '
领用人
',
field: 're
marks
',
title: '
备注
',
formatter: function (value, row, index) {
return Mustache.render($("#re
ceiver
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
return Mustache.render($("#re
marks
Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, ""), {
row: row,
idx: index
})
...
...
@@ -192,13 +192,13 @@
}, 0)
}
function onSelect
Type
(nodes, rowIndex) {
function onSelect
Receiver
(nodes, rowIndex) {
if (Array.isArray(nodes) && nodes.length === 1) {
var node = nodes[0];
var obj = {
type
: {
receiver
: {
id: node.id,
name: node.
text
name: node.
name
}
};
updateRow(rowIndex, obj)
...
...
@@ -342,7 +342,7 @@
</script>
<script id="receiverTpl" type="text/html">//<!--
<sys:gridselect url="${ctx}/sys/user/list" id="materialRequisitionInfoList{{idx}}_receiver" name="materialRequisitionInfoList[{{idx}}].receiver.id" value="{{row.receiver.id}}" labelName="materialRequisitionInfoList[{{idx}}].receiver.name" labelValue="{{row.receiver.name}}"
title="选择领用人" cssClass="form-control required" fieldLabels="领用人|手机|归属公司|归属部门"
validate="true
" validateSelector="#officeId" validateMsg="请选择领用机构" fieldKeys="name|phone|company.name|office.name" searchLabels="领用人" searchKeys="name" ></sys:gridselect>//-->
title="选择领用人" cssClass="form-control required" fieldLabels="领用人|手机|归属公司|归属部门"
iframeUrl="/warehouse/materialrequisition/materialRequisition/form" validate="true" callback="onSelectReceiver
" validateSelector="#officeId" validateMsg="请选择领用机构" fieldKeys="name|phone|company.name|office.name" searchLabels="领用人" searchKeys="name" ></sys:gridselect>//-->
</script>
<script id="remarksTpl" type="text/html">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2"
...
...
src/main/webapp/webpage/modules/warehouse/materialrequisition/materialRequisitionList.js
View file @
19f5c764
...
...
@@ -300,10 +300,13 @@ $(document).ready(function() {
<
table
class
=
"ani table"
>
<
thead
>
<
tr
>
<
th
>
物资领用主表
ID
<
/th
>
<
th
>
物资台账明细
ID
<
/th
>
<
th
>
物资编码
<
/th
>
<
th
>
物资名称
<
/th
>
<
th
>
型号
<
/th
>
<
th
>
类型
<
/th
>
<
th
>
单价
<
/th
>
<
th
>
领用人
<
/th
>
<
th
>
备注
信息
<
/th
>
<
th
>
备注
<
/th
>
<
/tr
>
<
/thead
>
<
tbody
id
=
"materialRequisitionChild-{{idx}}-1-List"
>
...
...
@@ -315,10 +318,19 @@ $(document).ready(function() {
<
script
type
=
"text/template"
id
=
"materialRequisitionChild1Tpl"
>
//<!--
<
tr
>
<
td
>
{{
row
.
materialRequisition
.
id
}}
{{
row
.
ledgerInfo
.
code
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
id
}}
{{
row
.
ledgerInfo
.
name
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
model
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
type
.
name
}}
<
/td
>
<
td
>
{{
row
.
ledgerInfo
.
amount
}}
<
/td
>
<
td
>
{{
row
.
receiver
.
name
}}
...
...
src/main/webapp/webpage/modules/warehouse/storage/storageDetail.jsp
View file @
19f5c764
...
...
@@ -203,6 +203,20 @@
}
}
function onSelectShelves(nodes, rowIndex){
if(Array.isArray(nodes) && nodes.length === 1){
var node = nodes[0];
var obj = {
shelves: {
id: node.id,
name: node.name
},
warehouse: node.warehouse
};
updateRow(rowIndex, obj)
}
}
/**
* 获取所有明细数据
* @returns {*|jQuery}
...
...
@@ -309,8 +323,8 @@
<input id="storageInfoList{{idx}}_model" name="storageInfoList[{{idx}}].model" type="text" value="{{row.model}}" readonly onchange="onInputChange('{{idx}}', this, 'model')" class="form-control "/>
</script>
<script id="shelvesTpl" type="text/html">//<!--
<sys:
gridselect url="${ctx}/warehouse/shelves/shelves/data"
id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="storageInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}"
title="选择货架" cssClass="form-control required" fieldLabels="货架名称|货架编号" fieldKeys="name|code" searchLabels="仓库名称|仓库编号" searchKeys="name|code" ></sys:grid
select>//-->
<sys:
shelvesselect
id="storageInfoList{{idx}}_shelves" name="storageInfoList[{{idx}}].shelves.id" value="{{row.shelves.id}}" labelName="storageInfoList[{{idx}}].shelves.name" labelValue="{{row.shelves.name}}"
cssClass="form-control required" iframeUrl="/warehouse/storage/storage/form" callback="onSelectShelves"></sys:shelves
select>//-->
</script>
<script id="remarksTpl" type="text/html">
<textarea id="storageInfoList{{idx}}_remarks" name="storageInfoList[{{idx}}].remarks" rows="2" onchange="onInputChange('{{idx}}', this, 'remarks')" class="form-control ">{{row.remarks}}</textarea>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment