Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
328244ba
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1431
Star
162
Fork
130
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
328244ba
编写于
9月 21, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
表格支持设置日期搜索条件
上级
48151bc9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
75 addition
and
101 deletion
+75
-101
erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js
...resources/template/js/erpstatistics/incomingstatistics.js
+14
-17
erp/src/main/resources/template/js/erpstatistics/salesstatistics.js
...in/resources/template/js/erpstatistics/salesstatistics.js
+28
-60
erp/src/main/resources/template/tpl/erpstatistics/salesstatistics.html
...resources/template/tpl/erpstatistics/salesstatistics.html
+2
-22
web/src/main/resources/template/assets/lib/layui/customer/tableUtil/initTableSearchUtil.js
...ssets/lib/layui/customer/tableUtil/initTableSearchUtil.js
+31
-2
未找到文件。
erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js
浏览文件 @
328244ba
...
...
@@ -10,15 +10,6 @@ layui.config({
form
=
layui
.
form
,
table
=
layui
.
table
;
// 获取本月日期
function
getOneYMFormatDate
(){
var
date
=
new
Date
;
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
month
=
(
month
<
10
?
"
0
"
+
month
:
month
);
return
year
.
toString
()
+
"
-
"
+
month
.
toString
();
}
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
...
...
@@ -31,17 +22,19 @@ layui.config({
limit
:
getLimit
(),
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
materialName
'
,
title
:
'
产品名称
'
,
align
:
'
left
'
,
width
:
250
},
{
field
:
'
materialModel
'
,
title
:
'
型号
'
,
align
:
'
left
'
,
width
:
150
},
{
field
:
'
unitName
'
,
title
:
'
单位
'
,
align
:
'
left
'
,
width
:
80
},
{
field
:
'
currentTock
'
,
title
:
'
进货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
currentTockMoney
'
,
title
:
'
进货金额
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
returnCurrentTock
'
,
title
:
'
退货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
materialName
'
,
title
:
'
产品名称
'
,
align
:
'
left
'
,
width
:
250
},
{
field
:
'
materialModel
'
,
title
:
'
型号
'
,
align
:
'
left
'
,
width
:
150
},
{
field
:
'
unitName
'
,
title
:
'
单位
'
,
align
:
'
left
'
,
width
:
80
},
{
field
:
'
currentTock
'
,
title
:
'
进货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
currentTockMoney
'
,
title
:
'
进货金额
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
returnCurrentTock
'
,
title
:
'
退货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
returnCurrentTockMoney
'
,
title
:
'
退货金额
'
,
align
:
'
left
'
,
width
:
120
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请选择日期
"
,
function
()
{
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
{
value
:
"
请选择日期
"
,
type
:
'
month
'
,
defaultValue
:
getOneYMFormatDate
(),
required
:
'
required
'
},
function
()
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
});
}
...
...
@@ -58,7 +51,11 @@ layui.config({
}
function
getTableParams
()
{
return
$
.
extend
(
true
,
{},
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
var
params
=
{};
if
(
$
(
"
#messageTableKeyWord
"
).
length
==
0
)
{
params
[
"
keyword
"
]
=
getOneYMFormatDate
();
}
return
$
.
extend
(
true
,
params
,
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
}
exports
(
'
incomingstatistics
'
,
{});
...
...
erp/src/main/resources/template/js/erpstatistics/salesstatistics.js
浏览文件 @
328244ba
var
rowId
=
""
;
//单据的时间
var
operTime
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
laydate
'
],
function
(
exports
)
{
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
laydate
=
layui
.
laydate
,
table
=
layui
.
table
;
//初始化统计时间
operTime
=
getOneYMFormatDate
();
//获取本月日期
function
getOneYMFormatDate
(){
var
date
=
new
Date
;
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
month
=
(
month
<
10
?
"
0
"
+
month
:
month
);
return
year
.
toString
()
+
"
-
"
+
month
.
toString
();
}
laydate
.
render
({
elem
:
'
#operTime
'
,
type
:
'
month
'
,
value
:
operTime
});
initTable
();
function
initTable
(){
table
.
render
({
...
...
@@ -37,62 +18,49 @@ layui.config({
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
flowableBasePath
+
'
statistics004
'
,
where
:
{
materialName
:
$
(
"
#materialName
"
).
val
(),
operTime
:
operTime
}
,
where
:
getTableParams
()
,
even
:
true
,
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
]
,
limit
:
8
,
limits
:
getLimits
()
,
limit
:
getLimit
()
,
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
type
:
'
numbers
'
},
{
field
:
'
materialName
'
,
title
:
'
产品名称
'
,
align
:
'
left
'
,
width
:
250
},
{
field
:
'
materialModel
'
,
title
:
'
型号
'
,
align
:
'
left
'
,
width
:
1
00
},
{
field
:
'
unitName
'
,
title
:
'
单位
'
,
align
:
'
left
'
,
width
:
80
},
{
field
:
'
currentTock
'
,
title
:
'
销售数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
currentTockMoney
'
,
title
:
'
销售金额
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
returnCurrentTock
'
,
title
:
'
退货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
materialName
'
,
title
:
'
产品名称
'
,
align
:
'
left
'
,
width
:
250
},
{
field
:
'
materialModel
'
,
title
:
'
型号
'
,
align
:
'
left
'
,
width
:
1
50
},
{
field
:
'
unitName
'
,
title
:
'
单位
'
,
align
:
'
left
'
,
width
:
80
},
{
field
:
'
currentTock
'
,
title
:
'
销售数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
currentTockMoney
'
,
title
:
'
销售金额
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
returnCurrentTock
'
,
title
:
'
退货数量
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
returnCurrentTockMoney
'
,
title
:
'
退货金额
'
,
align
:
'
left
'
,
width
:
120
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
{
value
:
"
请选择日期
"
,
type
:
'
month
'
,
defaultValue
:
getOneYMFormatDate
(),
required
:
'
required
'
},
function
()
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
});
}
});
form
.
render
();
}
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
loadTable
();
}
return
false
;
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
form
.
render
();
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#formSearch
"
,
function
()
{
refreshTable
();
})
//刷新
// 刷新
function
loadTable
()
{
if
(
isNull
(
$
(
"
#operTime
"
).
val
()))
{
//一定要记得,当createTime为空时
winui
.
window
.
msg
(
"
请选择日期.
"
,
{
icon
:
2
,
time
:
2000
});
}
else
{
operTime
=
$
(
"
#operTime
"
).
val
();
table
.
reloadData
(
"
messageTable
"
,
{
where
:{
materialName
:
$
(
"
#materialName
"
).
val
(),
operTime
:
operTime
}});
}
table
.
reloadData
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
//搜索
function
refreshTable
(){
if
(
isNull
(
$
(
"
#operTime
"
).
val
()))
{
//一定要记得,当createTime为空时
winui
.
window
.
msg
(
"
请选择日期.
"
,
{
icon
:
2
,
time
:
2000
});
}
else
{
operTime
=
$
(
"
#operTime
"
).
val
();
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:{
materialName
:
$
(
"
#materialName
"
).
val
(),
operTime
:
operTime
}})
}
}
function
getTableParams
()
{
var
params
=
{};
if
(
$
(
"
#messageTableKeyWord
"
).
length
==
0
)
{
params
[
"
keyword
"
]
=
getOneYMFormatDate
();
}
return
$
.
extend
(
true
,
params
,
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
}
exports
(
'
incomingstatistics
'
,
{});
});
erp/src/main/resources/template/tpl/erpstatistics/salesstatistics.html
浏览文件 @
328244ba
...
...
@@ -7,30 +7,10 @@
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"txtcenter"
style=
"margin:0 auto;padding-top:10px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"materialName"
name=
"materialName"
placeholder=
"请输入名称"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
>
单据日期
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"operTime"
name=
"operTime"
placeholder=
"请选择单据日期"
class=
"layui-input"
/>
</div>
<button
type=
"reset"
class=
"layui-btn layui-btn-primary list-form-search"
><language
showName=
"com.skyeye.reset"
></language></button>
<button
class=
"layui-btn list-form-search"
lay-submit
lay-filter=
"formSearch"
><language
showName=
"com.skyeye.search2"
></language></button>
</div>
</div>
</form>
</div>
<div
class=
"winui-tip alert-info"
id=
"showInfo"
>
注:此处包含零售+销售+其他出库。
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<div
style=
"width: calc(100% - 120px); float: right; padding: 8px 10px;"
>
<div
class=
"layui-form-mid layui-word-aux"
style=
"color: red !important;"
>
注:此处包含零售+销售+其他出库。
</div>
</div>
<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;"
>
...
...
web/src/main/resources/template/assets/lib/layui/customer/tableUtil/initTableSearchUtil.js
浏览文件 @
328244ba
...
...
@@ -89,11 +89,40 @@ var initTableSearchUtil = {
* @param keywordPlaceholder 关键字搜索的提示语
*/
initTableKeyWordSearch
:
function
(
tableId
,
keywordPlaceholder
)
{
var
str
=
'
<div class="keyword-box">
'
+
var
str
;
if
(
typeof
keywordPlaceholder
===
'
object
'
)
{
str
=
'
<div class="keyword-box">
'
+
'
<input type="text" id="
'
+
tableId
+
'
KeyWord" placeholder="
'
+
keywordPlaceholder
.
value
+
'
" class="layui-input search-input-keyword" />
'
+
'
<i class="fa fas fa-search input-icon search-btn-keyword" id="
'
+
tableId
+
'
SearchTable" title="
'
+
systemLanguage
[
"
com.skyeye.search2
"
][
languageType
]
+
'
"></i>
'
+
'
</div>
'
;
}
else
{
str
=
'
<div class="keyword-box">
'
+
'
<input type="text" id="
'
+
tableId
+
'
KeyWord" placeholder="
'
+
keywordPlaceholder
+
'
" class="layui-input search-input-keyword" />
'
+
'
<i class="fa fas fa-search input-icon search-btn-keyword" id="
'
+
tableId
+
'
SearchTable" title="
'
+
systemLanguage
[
"
com.skyeye.search2
"
][
languageType
]
+
'
"></i>
'
+
'
</div>
'
;
'
</div>
'
;
}
$
(
"
.winui-tool
"
).
append
(
str
);
// 当对输入框有要求时
if
(
typeof
keywordPlaceholder
===
'
object
'
)
{
// 是否有默认值
if
(
!
isNull
(
keywordPlaceholder
.
defaultValue
))
{
$
(
"
#
"
+
tableId
+
"
KeyWord
"
).
val
(
keywordPlaceholder
.
defaultValue
);
}
if
(
keywordPlaceholder
.
type
==
'
month
'
)
{
var
jsCon
;
// 是否必填
if
(
keywordPlaceholder
.
required
==
'
required
'
)
{
jsCon
=
'
<script>layui.define(["laydate"], function(exports) {
'
+
'
var laydate = layui.laydate;laydate.render({elem: "#
'
+
tableId
+
'
KeyWord", type: "
'
+
keywordPlaceholder
.
type
+
'
", trigger: "click", btns: ["confirm"]});
'
+
'
})</script>
'
;
}
else
{
jsCon
=
'
<script>layui.define(["laydate"], function(exports) {
'
+
'
var laydate = layui.laydate;laydate.render({elem: "#
'
+
tableId
+
'
KeyWord", type: "
'
+
keywordPlaceholder
.
type
+
'
", trigger: "click"});
'
+
'
})</script>
'
;
}
$
(
"
.winui-tool
"
).
append
(
jsCon
);
}
}
},
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录