Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
693f2516
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1440
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看板
提交
693f2516
编写于
9月 12, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
枚举类公共接口完成,ERP商品管理列表整改,单位概念修改为规格,价格信息修改为规格信息
上级
9a065cee
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
435 addition
and
258 deletion
+435
-258
erp/src/main/resources/template/js/material/materialAdd.js
erp/src/main/resources/template/js/material/materialAdd.js
+55
-47
erp/src/main/resources/template/js/material/materialDetails.js
...rc/main/resources/template/js/material/materialDetails.js
+3
-3
erp/src/main/resources/template/js/material/materialEdit.js
erp/src/main/resources/template/js/material/materialEdit.js
+100
-104
erp/src/main/resources/template/js/material/materialList.js
erp/src/main/resources/template/js/material/materialList.js
+135
-0
erp/src/main/resources/template/js/material/materialStockList.js
.../main/resources/template/js/material/materialStockList.js
+1
-1
erp/src/main/resources/template/tpl/material/materialAdd.html
...src/main/resources/template/tpl/material/materialAdd.html
+12
-6
erp/src/main/resources/template/tpl/material/materialDetails.html
...main/resources/template/tpl/material/materialDetails.html
+0
-0
erp/src/main/resources/template/tpl/material/materialDetailsTemplate.tpl
...sources/template/tpl/material/materialDetailsTemplate.tpl
+9
-3
erp/src/main/resources/template/tpl/material/materialEdit.html
...rc/main/resources/template/tpl/material/materialEdit.html
+12
-7
erp/src/main/resources/template/tpl/material/materialList.html
...rc/main/resources/template/tpl/material/materialList.html
+33
-0
erp/src/main/resources/template/tpl/material/materialStockList.html
...in/resources/template/tpl/material/materialStockList.html
+1
-1
erp/src/main/resources/template/tpl/material/materiallist.html
...rc/main/resources/template/tpl/material/materiallist.html
+0
-85
web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.js
...es/template/assets/lib/layui/customer/systemCommonUtil.js
+62
-1
web/src/main/resources/template/assets/lib/layui/layui.js
web/src/main/resources/template/assets/lib/layui/layui.js
+3
-0
web/src/main/resources/template/js/index/login.js
web/src/main/resources/template/js/index/login.js
+6
-0
web/src/main/resources/template/json/skyeyeClassEnum.json
web/src/main/resources/template/json/skyeyeClassEnum.json
+3
-0
未找到文件。
erp/src/main/resources/template/js/material/material
a
dd.js
→
erp/src/main/resources/template/js/material/material
A
dd.js
浏览文件 @
693f2516
...
...
@@ -102,18 +102,24 @@ layui.config({
});
}
// 状态
systemCommonUtil
.
showEnumDataListByClassName
(
"
commonEnable
"
,
'
radio
'
,
"
enabled
"
,
''
,
form
);
skyeyeEnclosure
.
init
(
'
enclosureUpload
'
);
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//提交前进行制空操作,防止多余的校验
if
(
$
(
"
#unit
"
).
val
()
===
'
true
'
){
//多单位
$
(
"
.single-term
"
).
find
(
"
input
"
).
val
(
""
);
}
else
{
//单单位
$
(
"
.many-term
"
).
find
(
"
select
"
).
val
(
""
);
form
.
render
(
'
select
'
);
$
(
"
#useTable
"
).
html
(
""
);
}
var
unit
=
$
(
"
input[name='unit']:checked
"
).
val
();
// 提交前进行制空操作,防止多余的校验
if
(
unit
==
2
)
{
// 多规格
$
(
"
.single-term
"
).
find
(
"
input
"
).
val
(
""
);
}
else
{
// 单规格
$
(
"
.many-term
"
).
find
(
"
select
"
).
val
(
""
);
form
.
render
(
'
select
'
);
$
(
"
#useTable
"
).
html
(
""
);
}
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
checkNodes
=
materialCategoryType
.
getCheckedNodes
(
true
);
...
...
@@ -122,24 +128,25 @@ layui.config({
return
false
;
}
var
tableData
=
new
Array
();
if
(
$
(
"
#unit
"
).
val
()
===
'
true
'
){
//多单位
if
(
!
subVerifyForm
(
"
unitGroupId
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
firstInUnit
"
))
return
false
;
//首选入库单位校验
if
(
!
subVerifyForm
(
"
firstOutUnit
"
))
return
false
;
//首选出库单位非空校验
//价格表校验
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
if
(
unit
==
2
)
{
// 多规格
if
(
!
subVerifyForm
(
"
unitGroupId
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
firstInUnit
"
))
return
false
;
//首选入库单位校验
if
(
!
subVerifyForm
(
"
firstOutUnit
"
))
return
false
;
//首选出库单位非空校验
//价格表校验
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请填写价格表~
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
unitId
=
$
(
item
).
attr
(
"
unitid
"
);
//数据库存储的id
if
(
!
subVerifyForm
(
"
safetyTock
"
+
rowNum
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
+
rowNum
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
+
rowNum
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
+
rowNum
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
+
rowNum
))
return
false
;
//销售价非空校验
if
(
!
subVerifyForm
(
"
safetyTock
"
+
rowNum
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
+
rowNum
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
+
rowNum
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
+
rowNum
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
+
rowNum
))
return
false
;
//销售价非空校验
var
row
=
{
unitId
:
unitId
,
safetyTock
:
$
(
"
#safetyTock
"
+
rowNum
).
val
(),
...
...
@@ -149,25 +156,26 @@ layui.config({
salePrice
:
$
(
"
#salePrice
"
+
rowNum
).
val
(),
normsStock
:
[]
};
$
.
each
(
normsStockList
,
function
(
j
,
bean
)
{
if
(
bean
.
trRow
===
rowNum
)
{
row
.
normsStock
=
[].
concat
(
bean
.
list
);
return
false
;
}
});
$
.
each
(
normsStockList
,
function
(
j
,
bean
)
{
if
(
bean
.
trRow
===
rowNum
)
{
row
.
normsStock
=
[].
concat
(
bean
.
list
);
return
false
;
}
});
tableData
.
push
(
row
);
});
if
(
tableData
.
length
<
rowTr
.
length
)
{
if
(
tableData
.
length
<
rowTr
.
length
)
{
return
false
;
}
}
else
{
//单单位
if
(
!
subVerifyForm
(
"
safetyTock
"
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
unitName
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
))
return
false
;
//销售价非空校验
var
row
=
{
}
else
{
// 单规格
if
(
!
subVerifyForm
(
"
safetyTock
"
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
unitName
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
))
return
false
;
//销售价非空校验
var
row
=
{
safetyTock
:
$
(
"
#safetyTock
"
).
val
(),
retailPrice
:
$
(
"
#retailPrice
"
).
val
(),
lowPrice
:
$
(
"
#lowPrice
"
).
val
(),
...
...
@@ -176,19 +184,20 @@ layui.config({
normsStock
:
normsStockItem
};
tableData
.
push
(
row
);
}
}
var
params
=
{
materialName
:
$
(
"
#materialName
"
).
val
(),
model
:
$
(
"
#model
"
).
val
(),
unitName
:
$
(
"
#unitName
"
).
val
(),
categoryId
:
checkNodes
[
0
].
id
,
remark
:
$
(
"
#remark
"
).
val
(),
unit
:
$
(
"
#unit
"
).
val
()
===
'
true
'
?
2
:
1
,
unit
:
unit
,
unitGroupId
:
$
(
"
#unitGroupId
"
).
val
(),
firstInUnit
:
$
(
"
#firstInUnit
"
).
val
(),
firstOutUnit
:
$
(
"
#firstOutUnit
"
).
val
(),
materialNorms
:
JSON
.
stringify
(
tableData
),
type
:
$
(
"
#fromType
"
).
val
()
===
'
true
'
?
1
:
2
,
enabled
:
$
(
"
#enabled input:radio[name='radioProperty']:checked
"
).
val
(),
enclosureInfo
:
skyeyeEnclosure
.
getEnclosureIdsByBoxId
(
'
enclosureUpload
'
)
};
...
...
@@ -279,17 +288,16 @@ layui.config({
}
}
//多单位开关
form
.
on
(
'
switch(unit)
'
,
function
(
data
)
{
//同步开关值
$
(
data
.
elem
).
val
(
data
.
elem
.
checked
);
if
(
data
.
elem
.
checked
){
//多单位
// 规格变化类型
form
.
on
(
'
radio(unit)
'
,
function
(
data
)
{
var
val
=
data
.
value
;
if
(
val
==
1
)
{
$
(
"
.many-term
"
).
hide
();
$
(
"
.single-term
"
).
show
();
}
else
{
$
(
"
.many-term
"
).
show
();
$
(
"
.single-term
"
).
hide
();
}
else
{
//单单位
$
(
"
.many-term
"
).
hide
();
$
(
"
.single-term
"
).
show
();
}
}
});
//商品来源开关
...
...
erp/src/main/resources/template/js/material/material
d
etails.js
→
erp/src/main/resources/template/js/material/material
D
etails.js
浏览文件 @
693f2516
...
...
@@ -21,7 +21,7 @@ layui.config({
url
:
flowableBasePath
+
"
material007
"
,
params
:
{
rowId
:
parent
.
rowId
},
pagination
:
false
,
template
:
getFileContent
(
'
tpl/material/material
d
etailsTemplate.tpl
'
),
template
:
getFileContent
(
'
tpl/material/material
D
etailsTemplate.tpl
'
),
ajaxSendAfter
:
function
(
json
)
{
if
(
json
.
bean
.
unit
==
'
1
'
){
//非多单位
var
item
=
json
.
bean
.
norms
[
0
];
...
...
@@ -53,9 +53,9 @@ layui.config({
$
(
"
body
"
).
on
(
"
click
"
,
"
.notice-title-click
"
,
function
(
e
)
{
mUnitId
=
$
(
this
).
attr
(
"
rowid
"
);
_openNewWindows
({
url
:
"
../../tpl/material/material
stocklist.html
"
,
url
:
"
../../tpl/material/material
StockList.html
"
,
title
:
"
库存明细
"
,
pageId
:
"
material
stockl
ist
"
,
pageId
:
"
material
StockL
ist
"
,
area
:
[
'
100vw
'
,
'
100vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
...
...
erp/src/main/resources/template/js/material/material
e
dit.js
→
erp/src/main/resources/template/js/material/material
E
dit.js
浏览文件 @
693f2516
...
...
@@ -50,22 +50,6 @@ layui.config({
pagination
:
false
,
template
:
showBaseTemplate
,
ajaxSendLoadBefore
:
function
(
hdb
)
{
//多单位
hdb
.
registerHelper
(
"
compare2
"
,
function
(
v1
,
options
){
if
(
v1
==
'
2
'
||
v1
==
2
){
return
'
checked
'
;
}
else
{
return
''
;
}
});
hdb
.
registerHelper
(
"
compare3
"
,
function
(
v1
,
options
){
if
(
v1
==
'
2
'
||
v1
==
2
){
return
'
true
'
;
}
else
{
return
'
false
'
;
}
});
//商品来源
hdb
.
registerHelper
(
"
fromType
"
,
function
(
v1
,
options
){
if
(
v1
==
'
1
'
||
v1
==
1
){
...
...
@@ -86,7 +70,7 @@ layui.config({
return
index
+
1
;
});
},
ajaxSendAfter
:
function
(
j
){
ajaxSendAfter
:
function
(
j
)
{
textool
.
init
({
eleId
:
'
remark
'
,
maxlength
:
200
});
...
...
@@ -123,44 +107,48 @@ layui.config({
// 附件回显
skyeyeEnclosure
.
initTypeISData
({
'
enclosureUpload
'
:
json
.
bean
.
enclosureInfo
});
if
(
j
.
bean
.
unit
==
'
1
'
){
//非多单位
$
(
"
.many-term
"
).
hide
();
$
(
"
#safetyTock
"
).
val
(
j
.
bean
.
norms
[
0
].
safetyTock
);
$
(
"
#unitName
"
).
val
(
j
.
bean
.
unitName
);
$
(
"
#retailPrice
"
).
val
(
j
.
bean
.
norms
[
0
].
retailPrice
);
$
(
"
#lowPrice
"
).
val
(
j
.
bean
.
norms
[
0
].
lowPrice
);
$
(
"
#estimatePurchasePrice
"
).
val
(
j
.
bean
.
norms
[
0
].
estimatePurchasePrice
);
$
(
"
#salePrice
"
).
val
(
j
.
bean
.
norms
[
0
].
salePrice
);
//加载规格下的初始库存信息
normsStockItem
=
[].
concat
(
j
.
bean
.
norms
[
0
].
normStock
);
var
str
=
""
;
$
.
each
(
j
.
bean
.
norms
[
0
].
normStock
,
function
(
i
,
item
)
{
str
+=
'
<br><span class="layui-badge layui-bg-blue" style="height: 25px !important; line-height: 25px !important; margin: 5px 0px;">
'
+
item
.
depotName
+
'
<span class="layui-badge layui-bg-gray">
'
+
item
.
initialTock
+
'
</span></span>
'
;
});
$
(
"
input:radio[name=unit][value=
"
+
j
.
bean
.
unit
+
"
]
"
).
attr
(
"
checked
"
,
true
);
if
(
j
.
bean
.
unit
==
1
)
{
// 单规格
$
(
"
.many-term
"
).
hide
();
$
(
"
#safetyTock
"
).
val
(
j
.
bean
.
norms
[
0
].
safetyTock
);
$
(
"
#unitName
"
).
val
(
j
.
bean
.
unitName
);
$
(
"
#retailPrice
"
).
val
(
j
.
bean
.
norms
[
0
].
retailPrice
);
$
(
"
#lowPrice
"
).
val
(
j
.
bean
.
norms
[
0
].
lowPrice
);
$
(
"
#estimatePurchasePrice
"
).
val
(
j
.
bean
.
norms
[
0
].
estimatePurchasePrice
);
$
(
"
#salePrice
"
).
val
(
j
.
bean
.
norms
[
0
].
salePrice
);
//加载规格下的初始库存信息
normsStockItem
=
[].
concat
(
j
.
bean
.
norms
[
0
].
normStock
);
var
str
=
""
;
$
.
each
(
j
.
bean
.
norms
[
0
].
normStock
,
function
(
i
,
item
)
{
str
+=
'
<br><span class="layui-badge layui-bg-blue" style="height: 25px !important; line-height: 25px !important; margin: 5px 0px;">
'
+
item
.
depotName
+
'
<span class="layui-badge layui-bg-gray">
'
+
item
.
initialTock
+
'
</span></span>
'
;
});
$
(
"
#initialTock
"
).
parent
().
html
(
'
<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" id="initialTock">新增库存</button>
'
+
str
);
}
else
{
//多单位
$
(
"
.single-term
"
).
hide
();
$
(
"
#unitGroupId
"
).
val
(
j
.
bean
.
unitGroupId
);
//加载默认值
$
.
each
(
unitGroupList
,
function
(
i
,
item
)
{
if
(
item
.
id
==
j
.
bean
.
unitGroupId
){
var
str
=
getDataUseHandlebars
(
selTemplate
,
{
rows
:
item
.
unitList
});
$
(
"
#firstInUnit
"
).
html
(
str
);
$
(
"
#firstOutUnit
"
).
html
(
str
);
$
(
"
#firstInUnit
"
).
val
(
j
.
bean
.
firstInUnit
);
$
(
"
#firstOutUnit
"
).
val
(
j
.
bean
.
firstOutUnit
);
form
.
render
(
'
select
'
);
return
false
;
}
});
$
.
each
(
j
.
bean
.
norms
,
function
(
i
,
item
)
{
normsStockList
.
push
({
trRow
:
unitIndex
.
toString
(),
list
:
[].
concat
(
item
.
normStock
)
});
unitIndex
++
;
});
}
}
else
{
// 多规格
$
(
"
.single-term
"
).
hide
();
$
(
"
#unitGroupId
"
).
val
(
j
.
bean
.
unitGroupId
);
//加载默认值
$
.
each
(
unitGroupList
,
function
(
i
,
item
)
{
if
(
item
.
id
==
j
.
bean
.
unitGroupId
)
{
var
str
=
getDataUseHandlebars
(
selTemplate
,
{
rows
:
item
.
unitList
});
$
(
"
#firstInUnit
"
).
html
(
str
);
$
(
"
#firstOutUnit
"
).
html
(
str
);
$
(
"
#firstInUnit
"
).
val
(
j
.
bean
.
firstInUnit
);
$
(
"
#firstOutUnit
"
).
val
(
j
.
bean
.
firstOutUnit
);
form
.
render
(
'
select
'
);
return
false
;
}
});
$
.
each
(
j
.
bean
.
norms
,
function
(
i
,
item
)
{
normsStockList
.
push
({
trRow
:
unitIndex
.
toString
(),
list
:
[].
concat
(
item
.
normStock
)
});
unitIndex
++
;
});
}
matchingLanguage
();
form
.
render
();
}
...
...
@@ -170,18 +158,24 @@ layui.config({
searchZtree
(
materialCategoryType
,
$
(
"
#name
"
).
val
());
});
//初始化工序
//
初始化工序
procedureMationList
=
[].
concat
(
j
.
bean
.
procedureMationList
);
// 状态
systemCommonUtil
.
showEnumDataListByClassName
(
"
commonEnable
"
,
'
radio
'
,
"
enabled
"
,
j
.
bean
.
enabled
,
form
);
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
//提交前进行制空操作,防止多余的校验
if
(
$
(
"
#unit
"
).
val
()
===
'
true
'
){
//多单位
$
(
"
.single-term
"
).
find
(
"
input
"
).
val
(
""
);
}
else
{
//单单位
$
(
"
.many-term
"
).
find
(
"
select
"
).
val
(
""
);
form
.
render
(
'
select
'
);
$
(
"
#useTable
"
).
html
(
""
);
}
var
unit
=
$
(
"
input[name='unit']:checked
"
).
val
();
// 提交前进行制空操作,防止多余的校验
if
(
unit
==
2
)
{
// 多规格
$
(
"
.single-term
"
).
find
(
"
input
"
).
val
(
""
);
}
else
{
// 单规格
$
(
"
.many-term
"
).
find
(
"
select
"
).
val
(
""
);
form
.
render
(
'
select
'
);
$
(
"
#useTable
"
).
html
(
""
);
}
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
checkNodes
=
materialCategoryType
.
getCheckedNodes
(
true
);
...
...
@@ -190,24 +184,25 @@ layui.config({
return
false
;
}
var
tableData
=
new
Array
();
if
(
$
(
"
#unit
"
).
val
()
===
'
true
'
){
//多单位
if
(
!
subVerifyForm
(
"
unitGroupId
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
firstInUnit
"
))
return
false
;
//首选入库单位校验
if
(
!
subVerifyForm
(
"
firstOutUnit
"
))
return
false
;
//首选出库单位非空校验
//价格表校验
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
if
(
unit
==
2
)
{
// 多规格
if
(
!
subVerifyForm
(
"
unitGroupId
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
firstInUnit
"
))
return
false
;
//首选入库单位校验
if
(
!
subVerifyForm
(
"
firstOutUnit
"
))
return
false
;
//首选出库单位非空校验
//价格表校验
var
rowTr
=
$
(
"
#useTable tr
"
);
if
(
rowTr
.
length
==
0
)
{
winui
.
window
.
msg
(
'
请填写价格表~
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
$
.
each
(
rowTr
,
function
(
i
,
item
)
{
var
rowNum
=
$
(
item
).
attr
(
"
trcusid
"
).
replace
(
"
tr
"
,
""
);
var
unitId
=
$
(
item
).
attr
(
"
unitid
"
);
//数据库存储的id
if
(
!
subVerifyForm
(
"
safetyTock
"
+
rowNum
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
+
rowNum
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
+
rowNum
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
+
rowNum
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
+
rowNum
))
return
false
;
//销售价非空校验
if
(
!
subVerifyForm
(
"
safetyTock
"
+
rowNum
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
+
rowNum
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
+
rowNum
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
+
rowNum
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
+
rowNum
))
return
false
;
//销售价非空校验
var
row
=
{
unitId
:
unitId
,
safetyTock
:
$
(
"
#safetyTock
"
+
rowNum
).
val
(),
...
...
@@ -217,25 +212,26 @@ layui.config({
salePrice
:
$
(
"
#salePrice
"
+
rowNum
).
val
(),
normsStock
:
[]
};
$
.
each
(
normsStockList
,
function
(
j
,
bean
)
{
if
(
bean
.
trRow
===
rowNum
)
{
row
.
normsStock
=
[].
concat
(
bean
.
list
);
return
false
;
}
});
$
.
each
(
normsStockList
,
function
(
j
,
bean
)
{
if
(
bean
.
trRow
===
rowNum
)
{
row
.
normsStock
=
[].
concat
(
bean
.
list
);
return
false
;
}
});
tableData
.
push
(
row
);
});
if
(
tableData
.
length
<
rowTr
.
length
)
{
if
(
tableData
.
length
<
rowTr
.
length
)
{
return
false
;
}
}
else
{
//单单位
if
(
!
subVerifyForm
(
"
safetyTock
"
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
unitName
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
))
return
false
;
//销售价非空校验
var
row
=
{
}
else
{
// 单规格
if
(
!
subVerifyForm
(
"
safetyTock
"
))
return
false
;
//安全存量非空校验
if
(
!
subVerifyForm
(
"
unitName
"
))
return
false
;
//单位非空校验
if
(
!
subVerifyForm
(
"
retailPrice
"
))
return
false
;
//零售价非空校验
if
(
!
subVerifyForm
(
"
lowPrice
"
))
return
false
;
//最低售价非空校验
if
(
!
subVerifyForm
(
"
estimatePurchasePrice
"
))
return
false
;
//预计采购价非空校验
if
(
!
subVerifyForm
(
"
salePrice
"
))
return
false
;
//销售价非空校验
var
row
=
{
safetyTock
:
$
(
"
#safetyTock
"
).
val
(),
retailPrice
:
$
(
"
#retailPrice
"
).
val
(),
lowPrice
:
$
(
"
#lowPrice
"
).
val
(),
...
...
@@ -244,20 +240,21 @@ layui.config({
normsStock
:
normsStockItem
};
tableData
.
push
(
row
);
}
}
var
params
=
{
materialName
:
$
(
"
#materialName
"
).
val
(),
model
:
$
(
"
#model
"
).
val
(),
unitName
:
$
(
"
#unitName
"
).
val
(),
categoryId
:
checkNodes
[
0
].
id
,
remark
:
$
(
"
#remark
"
).
val
(),
unit
:
$
(
"
#unit
"
).
val
()
===
'
true
'
?
2
:
1
,
unit
:
unit
,
unitGroupId
:
$
(
"
#unitGroupId
"
).
val
(),
firstInUnit
:
$
(
"
#firstInUnit
"
).
val
(),
firstOutUnit
:
$
(
"
#firstOutUnit
"
).
val
(),
materialNorms
:
JSON
.
stringify
(
tableData
),
type
:
$
(
"
#fromType
"
).
val
()
===
'
true
'
?
1
:
2
,
id
:
parent
.
rowId
,
enabled
:
$
(
"
#enabled input:radio[name='radioProperty']:checked
"
).
val
(),
enclosureInfo
:
skyeyeEnclosure
.
getEnclosureIdsByBoxId
(
'
enclosureUpload
'
)
};
...
...
@@ -373,19 +370,18 @@ layui.config({
return
true
;
}
}
//多单位开关
form
.
on
(
'
switch(unit)
'
,
function
(
data
)
{
//同步开关值
$
(
data
.
elem
).
val
(
data
.
elem
.
checked
);
if
(
data
.
elem
.
checked
){
//多单位
// 规格变化类型
form
.
on
(
'
radio(unit)
'
,
function
(
data
)
{
var
val
=
data
.
value
;
if
(
val
==
1
)
{
$
(
"
.many-term
"
).
hide
();
$
(
"
.single-term
"
).
show
();
}
else
{
$
(
"
.many-term
"
).
show
();
$
(
"
.single-term
"
).
hide
();
}
else
{
//单单位
$
(
"
.many-term
"
).
hide
();
$
(
"
.single-term
"
).
show
();
}
});
}
});
//商品来源开关
form
.
on
(
'
switch(fromType)
'
,
function
(
data
)
{
...
...
erp/src/main/resources/template/js/material/material
l
ist.js
→
erp/src/main/resources/template/js/material/material
L
ist.js
浏览文件 @
693f2516
...
...
@@ -6,12 +6,11 @@ layui.config({
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
eleTree
'
],
function
(
exports
)
{
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
,
eleTree
=
layui
.
eleTree
;
table
=
layui
.
table
;
authBtn
(
'
1570697180609
'
);
...
...
@@ -31,23 +30,27 @@ layui.config({
return
'
<a lay-event="details" class="notice-title-click">
'
+
d
.
name
+
'
</a>
'
;
}},
{
field
:
'
model
'
,
title
:
'
型号
'
,
align
:
'
left
'
,
width
:
150
},
{
field
:
'
categoryName
'
,
title
:
'
所属类型
'
,
align
:
'
center
'
,
width
:
100
},
{
field
:
'
categoryName
'
,
title
:
'
所属类型
'
,
width
:
100
},
{
field
:
'
typeName
'
,
title
:
'
商品来源
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
unitType
'
,
title
:
'
规格类型
'
,
align
:
'
center
'
,
width
:
100
},
{
field
:
'
enabled
'
,
title
:
'
状态
'
,
align
:
'
center
'
,
width
:
60
,
templet
:
function
(
d
)
{
if
(
d
.
enabled
==
'
0
'
)
{
return
"
<span class='state-down'>禁用</span>
"
;
}
else
if
(
d
.
enabled
==
'
1
'
)
{
return
"
<span class='state-up'>启用</span>
"
;
}
if
(
d
.
enabled
==
2
)
{
return
"
<span class='state-down'>禁用</span>
"
;
}
else
if
(
d
.
enabled
==
1
)
{
return
"
<span class='state-up'>启用</span>
"
;
}
}},
{
field
:
'
createTime
'
,
title
:
systemLanguage
[
"
com.skyeye.createTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
260
,
toolbar
:
'
#tableBar
'
}
{
field
:
'
createName
'
,
title
:
systemLanguage
[
"
com.skyeye.createName
"
][
languageType
],
width
:
120
},
{
field
:
'
createTime
'
,
title
:
systemLanguage
[
"
com.skyeye.createTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
field
:
'
lastUpdateName
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateName
"
][
languageType
],
align
:
'
left
'
,
width
:
120
},
{
field
:
'
lastUpdateTime
'
,
title
:
systemLanguage
[
"
com.skyeye.lastUpdateTime
"
][
languageType
],
align
:
'
center
'
,
width
:
150
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
120
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
if
(
!
loadFirstType
)
{
initFirstType
(
);
}
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请输入商品名称,规格
"
,
function
()
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()}
);
});
}
});
...
...
@@ -58,68 +61,29 @@ layui.config({
edit
(
data
);
}
else
if
(
layEvent
===
'
delet
'
)
{
//删除
delet
(
data
);
}
else
if
(
layEvent
===
'
up
'
)
{
//启用
up
(
data
);
}
else
if
(
layEvent
===
'
down
'
)
{
//禁用
down
(
data
);
}
else
if
(
layEvent
===
'
details
'
)
{
//详情
details
(
data
);
}
});
var
loadFirstType
=
false
;
//初始化商品类型
function
initFirstType
(){
loadFirstType
=
true
;
var
el5
;
el5
=
eleTree
.
render
({
elem
:
'
.ele5
'
,
url
:
flowableBasePath
+
"
materialcategory009
"
,
defaultExpandAll
:
true
,
expandOnClickNode
:
false
,
highlightCurrent
:
true
});
$
(
"
.ele5
"
).
hide
();
$
(
"
#categoryId
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
stopPropagation
();
$
(
"
.ele5
"
).
toggle
();
});
eleTree
.
on
(
"
nodeClick(data5)
"
,
function
(
d
)
{
$
(
"
#categoryId
"
).
val
(
d
.
data
.
currentData
.
name
);
$
(
"
#categoryId
"
).
attr
(
"
categoryId
"
,
d
.
data
.
currentData
.
id
);
$
(
"
.ele5
"
).
hide
();
})
$
(
document
).
on
(
"
click
"
,
function
()
{
$
(
"
.ele5
"
).
hide
();
})
}
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
refreshloadTable
();
}
return
false
;
});
//详情
// 详情
function
details
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/material/material
details.html
"
,
url
:
"
../../tpl/material/material
Details.html
"
,
title
:
systemLanguage
[
"
com.skyeye.detailsPageTitle
"
][
languageType
],
pageId
:
"
material
d
etails
"
,
pageId
:
"
material
D
etails
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
}
//添加
//
添加
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
_openNewWindows
({
url
:
"
../../tpl/material/material
add.html
"
,
url
:
"
../../tpl/material/material
Add.html
"
,
title
:
systemLanguage
[
"
com.skyeye.addPageTitle
"
][
languageType
],
pageId
:
"
material
a
dd
"
,
pageId
:
"
material
A
dd
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
...
...
@@ -127,7 +91,7 @@ layui.config({
}});
});
//删除
//
删除
function
delet
(
data
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.deleteOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.deleteOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
...
...
@@ -138,35 +102,13 @@ layui.config({
});
}
//禁用
function
down
(
data
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.disableOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.disableOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
material004
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.disableOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
}
//启用
function
up
(
data
)
{
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.enableOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.enableOperation
"
][
languageType
]},
function
(
index
)
{
layer
.
close
(
index
);
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
material005
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.enableOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
}
//编辑
// 编辑
function
edit
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/material/material
edit.html
"
,
url
:
"
../../tpl/material/material
Edit.html
"
,
title
:
systemLanguage
[
"
com.skyeye.editPageTitle
"
][
languageType
],
pageId
:
"
material
e
dit
"
,
pageId
:
"
material
E
dit
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
...
...
@@ -174,7 +116,8 @@ layui.config({
}
});
}
form
.
render
();
// 刷新数据
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
...
...
@@ -184,19 +127,9 @@ layui.config({
table
.
reloadData
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
function
refreshloadTable
()
{
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
}
function
getTableParams
()
{
return
{
materialName
:
$
(
"
#materialName
"
).
val
(),
model
:
$
(
"
#model
"
).
val
(),
categoryId
:
isNull
(
$
(
"
#categoryId
"
).
val
())
?
""
:
$
(
"
#categoryId
"
).
attr
(
"
categoryId
"
),
typeNum
:
$
(
"
#typeNum
"
).
val
(),
enabled
:
$
(
"
#enabled
"
).
val
()
};
return
$
.
extend
(
true
,
{},
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
}
exports
(
'
material
l
ist
'
,
{});
exports
(
'
material
L
ist
'
,
{});
});
erp/src/main/resources/template/js/material/material
stockl
ist.js
→
erp/src/main/resources/template/js/material/material
StockL
ist.js
浏览文件 @
693f2516
...
...
@@ -85,6 +85,6 @@ layui.config({
}});
}
exports
(
'
material
stockl
ist
'
,
{});
exports
(
'
material
StockL
ist
'
,
{});
});
erp/src/main/resources/template/tpl/material/material
a
dd.html
→
erp/src/main/resources/template/tpl/material/material
A
dd.html
浏览文件 @
693f2516
...
...
@@ -26,7 +26,7 @@
<input
type=
"text"
id=
"model"
name=
"model"
win-verify=
"required"
placeholder=
"请输入型号"
class=
"layui-input"
maxlength=
"50"
/>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs
12
"
>
<div
class=
"layui-form-item layui-col-xs
6
"
>
<label
class=
"layui-form-label"
>
所属类型
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-inline"
style=
"width: 100%"
>
...
...
@@ -40,6 +40,11 @@
</div>
</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"
id=
"enabled"
>
</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 winui-switch"
>
...
...
@@ -64,12 +69,13 @@
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
价
格信息
</span><hr>
<span
class=
"hr-title"
>
规
格信息
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
多单位
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block winui-switch"
>
<input
id=
"unit"
name=
"unit"
lay-filter=
"unit"
type=
"checkbox"
lay-skin=
"switch"
lay-text=
"是|否"
value=
"false"
/>
<label
class=
"layui-form-label"
>
规格类型
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block winui-radio"
>
<input
type=
"radio"
name=
"unit"
value=
"1"
title=
"单规格"
lay-filter=
"unit"
checked=
"checked"
/>
<input
type=
"radio"
name=
"unit"
value=
"2"
title=
"多规格"
lay-filter=
"unit"
/>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6 single-term"
>
...
...
@@ -212,7 +218,7 @@
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.exhide.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/ztree/js/fuzzysearch.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
a
dd
'
);
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
A
dd
'
);
</script>
</body>
</html>
\ No newline at end of file
erp/src/main/resources/template/tpl/material/material
d
etails.html
→
erp/src/main/resources/template/tpl/material/material
D
etails.html
浏览文件 @
693f2516
文件已移动
erp/src/main/resources/template/tpl/material/material
d
etailsTemplate.tpl
→
erp/src/main/resources/template/tpl/material/material
D
etailsTemplate.tpl
浏览文件 @
693f2516
...
...
@@ -14,12 +14,18 @@
{
{
model
}
}
</div>
</div>
<div
class=
"layui-form-item layui-col-xs
12
"
>
<div
class=
"layui-form-item layui-col-xs
6
"
>
<label
class=
"layui-form-label"
>
所属类型:
</label>
<div
class=
"layui-input-block ver-center"
>
{
{
categoryName
}
}
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
状态:
</label>
<div
class=
"layui-input-block ver-center"
>
{
{
enabled
}
}
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
商品来源:
</label>
<div
class=
"layui-input-block ver-center"
>
...
...
@@ -49,10 +55,10 @@
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
价
格信息
</span><hr>
<span
class=
"hr-title"
>
规
格信息
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
单位
类型:
</label>
<label
class=
"layui-form-label"
>
规格
类型:
</label>
<div
class=
"layui-input-block ver-center"
>
{
{
unitType
}
}
</div>
...
...
erp/src/main/resources/template/tpl/material/material
e
dit.html
→
erp/src/main/resources/template/tpl/material/material
E
dit.html
浏览文件 @
693f2516
...
...
@@ -45,7 +45,7 @@
<
input
type
=
"
text
"
id
=
"
model
"
name
=
"
model
"
win
-
verify
=
"
required
"
placeholder
=
"
请输入型号
"
class
=
"
layui-input
"
maxlength
=
"
50
"
value
=
"
{{model}}
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs
12
"
>
<
div
class
=
"
layui-form-item layui-col-xs
6
"
>
<
label
class
=
"
layui-form-label
"
>
所属类型
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
div
class
=
"
layui-inline
"
style
=
"
width: 100%
"
>
...
...
@@ -59,6 +59,11 @@
<
/div
>
<
/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
"
id
=
"
enabled
"
>
<
/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 winui-switch
"
>
...
...
@@ -89,13 +94,13 @@
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
span
class
=
"
hr-title
"
>
价格信息
<
/span
>
<
hr
>
<
span
class
=
"
hr-title
"
>
规格信息
<
/span><hr
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
多单位
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block winui-switch
"
>
<
input
id
=
"
unit
"
name
=
"
unit
"
lay
-
filter
=
"
unit
"
type
=
"
checkbox
"
lay
-
skin
=
"
switch
"
lay
-
text
=
"
是|否
"
{{
#
compare2
unit
}}{{
/
compare2
}}
value
=
"
{{#compare3 unit}}{{/compare3}}
"
/>
<
label
class
=
"
layui-form-label
"
>
规格类型
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block winui-radio
"
>
<
input
type
=
"
radio
"
name
=
"
unit
"
value
=
"
1
"
title
=
"
单规格
"
lay
-
filter
=
"
unit
"
/>
<
input
type
=
"
radio
"
name
=
"
unit
"
value
=
"
2
"
title
=
"
多规格
"
lay
-
filter
=
"
unit
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs6 single-term
"
>
...
...
@@ -258,7 +263,7 @@
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.exhide.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../assets/lib/layui/lay/modules/ztree/js/fuzzysearch.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
e
dit
'
);
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
E
dit
'
);
</script>
</body>
</html>
\ No newline at end of file
erp/src/main/resources/template/tpl/material/materialList.html
0 → 100644
浏览文件 @
693f2516
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<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>
<button
id=
"addBean"
class=
"winui-toolbtn search-table-btn-right"
auth=
"1570697180609"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
1570697233834
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-normal
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1570697208099
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
delet
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
materialList
'
);
</script>
</body>
</html>
\ No newline at end of file
erp/src/main/resources/template/tpl/material/material
stockl
ist.html
→
erp/src/main/resources/template/tpl/material/material
StockL
ist.html
浏览文件 @
693f2516
...
...
@@ -13,7 +13,7 @@
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
stockl
ist
'
);
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
material
StockL
ist
'
);
</script>
</body>
</html>
\ No newline at end of file
erp/src/main/resources/template/tpl/material/materiallist.html
已删除
100644 → 0
浏览文件 @
9a065cee
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<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=
"model"
name=
"model"
placeholder=
"请输入产品型号"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
>
所属类型
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"categoryId"
name=
"categoryId"
placeholder=
"请选择商品类型"
class=
"layui-input"
readonly=
"readonly"
categoryId=
""
/>
<div
class=
"eleTree ele5"
lay-filter=
"data5"
></div>
</div>
<label
class=
"layui-form-label"
>
商品来源
</label>
<div
class=
"layui-input-inline"
>
<select
lay-filter=
"typeNum"
lay-search=
""
id=
"typeNum"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
自产
</option>
<option
value=
"2"
>
外购
</option>
</select>
</div>
<label
class=
"layui-form-label"
>
状态
</label>
<div
class=
"layui-input-inline"
>
<select
lay-filter=
"enabled"
lay-search=
""
id=
"enabled"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
>
禁用
</option>
<option
value=
"1"
>
启用
</option>
</select>
</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-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>
<button
id=
"addBean"
class=
"winui-toolbtn"
auth=
"1570697180609"
>
<i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
<language
showName=
"com.skyeye.addBtn"
></language>
</button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
d
.
enabled
==
1
&&
auth
(
'
1570697191121
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
down
"
><
language
showName
=
"
com.skyeye.disableBtn
"
><
/language></
a
>
{{
#
}
else
if
(
d
.
enabled
==
0
){
}}
{{
#
if
(
auth
(
'
1570697199781
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
up
"
><
language
showName
=
"
com.skyeye.enableBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
(
auth
(
'
1570697233834
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-normal
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
auth
(
'
1570697208099
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
delet
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/material/
'
}).
use
(
'
materiallist
'
);
</script>
</body>
</html>
\ No newline at end of file
web/src/main/resources/template/assets/lib/layui/customer/systemCommonUtil.js
浏览文件 @
693f2516
...
...
@@ -611,6 +611,67 @@ var systemCommonUtil = {
show
(
'
#
'
+
id
,
data
);
}
};
}
},
/**
* 展示枚举类的集合数据
*
* @param code 枚举类对应的前台code
* @param showType 展示类型
* @param showBoxId 展示位置
* @param defaultId 默认回显值
* @param form form对象
* @param callback 回调函数
*/
showEnumDataListByClassName
:
function
(
code
,
showType
,
showBoxId
,
defaultId
,
form
,
callback
)
{
var
params
=
{
className
:
encodeURIComponent
(
skyeyeClassEnum
[
code
][
"
className
"
])
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
getEnumDataByClassName
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
GET
"
,
callback
:
function
(
json
)
{
if
(
showType
==
'
select
'
)
{
$
(
"
#
"
+
showBoxId
).
html
(
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/select-option.tpl
'
),
json
));
if
(
!
isNull
(
defaultId
))
{
$
(
"
#
"
+
showBoxId
).
val
(
defaultId
);
}
else
{
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
isDefault
)
{
$
(
"
#
"
+
showBoxId
).
val
(
item
.
id
);
}
});
}
form
.
render
(
'
select
'
);
}
else
if
(
showType
==
'
checkbox
'
)
{
$
(
"
#
"
+
showBoxId
).
html
(
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/checkbox-property.tpl
'
),
json
));
if
(
!
isNull
(
defaultId
))
{
var
arr
=
defaultId
.
split
(
"
,
"
);
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
$
(
'
input:checkbox[rowId="
'
+
arr
[
i
]
+
'
"]
'
).
attr
(
"
checked
"
,
true
);
}
}
else
{
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
isDefault
)
{
$
(
'
input:checkbox[rowId="
'
+
item
.
id
+
'
"]
'
).
attr
(
"
checked
"
,
true
);
}
});
}
form
.
render
(
'
checkbox
'
);
}
else
if
(
showType
==
'
radio
'
)
{
$
(
"
#
"
+
showBoxId
).
html
(
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/radio-property.tpl
'
),
json
));
if
(
!
isNull
(
defaultId
))
{
$
(
"
#
"
+
showBoxId
+
"
input:radio[name=radioProperty][value=
"
+
defaultId
+
"
]
"
).
attr
(
"
checked
"
,
true
);
}
else
{
$
.
each
(
json
.
rows
,
function
(
i
,
item
)
{
if
(
item
.
isDefault
)
{
$
(
"
#
"
+
showBoxId
+
"
input:radio[name=radioProperty][value=
"
+
item
.
id
+
"
]
"
).
attr
(
"
checked
"
,
true
);
}
});
}
form
.
render
(
'
radio
'
);
}
if
(
typeof
(
callback
)
==
"
function
"
)
{
callback
(
json
);
}
},
async
:
false
});
},
};
\ No newline at end of file
web/src/main/resources/template/assets/lib/layui/layui.js
浏览文件 @
693f2516
...
...
@@ -84,6 +84,7 @@ var lacolMap = {
"
sysDsFormWithCodeType
"
:
"
../../json/sysDsFormWithCodeType.json
"
,
"
sysActivitiModel
"
:
"
../../json/activitiNameKey.json
"
,
"
sysDictData
"
:
"
../../json/sysDictData.json
"
,
"
skyeyeClassEnum
"
:
"
../../json/skyeyeClassEnum.json
"
,
};
// 用户中英文类型
...
...
@@ -99,6 +100,8 @@ var sysDsFormWithCodeType = getAndWriteLocal('sysDsFormWithCodeType');
var
sysActivitiModel
=
getAndWriteLocal
(
'
sysActivitiModel
'
);
// 数据字典关联json文件
var
sysDictData
=
getAndWriteLocal
(
'
sysDictData
'
);
// 枚举类关联json文件
var
skyeyeClassEnum
=
getAndWriteLocal
(
'
skyeyeClassEnum
'
);
function
getAndWriteLocal
(
key
)
{
if
(
isNull
(
localStorage
.
getItem
(
key
)))
{
...
...
web/src/main/resources/template/js/index/login.js
浏览文件 @
693f2516
...
...
@@ -45,6 +45,12 @@ layui.config({
sysDictData
=
data
;
localStorage
.
setItem
(
"
sysDictData
"
,
JSON
.
stringify
(
data
));
});
// 枚举类关联json文件
jsGetJsonFile
(
"
../../json/skyeyeClassEnum.json
"
,
function
(
data
)
{
skyeyeClassEnum
=
data
;
localStorage
.
setItem
(
"
skyeyeClassEnum
"
,
JSON
.
stringify
(
data
));
});
// 是否登陆中,默认否
var
isLogin
=
false
;
...
...
web/src/main/resources/template/json/skyeyeClassEnum.json
0 → 100644
浏览文件 @
693f2516
{
"commonEnable"
:
{
"name"
:
"启用/禁用"
,
"className"
:
"skyeye-pro#com.skyeye.common.enumeration.EnableEnum"
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录