Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
efc3bccf
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看板
提交
efc3bccf
编写于
9月 29, 2023
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码修改
上级
4fa5b982
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
70 addition
and
132 deletion
+70
-132
erp-produce/src/main/resources/template/js/erpBom/erpBomList.js
...oduce/src/main/resources/template/js/erpBom/erpBomList.js
+24
-26
erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js
...n/resources/template/js/erpProduction/erpProductionAdd.js
+1
-1
erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js
.../resources/template/js/erpProduction/erpProductionEdit.js
+1
-1
erp/src/main/resources/template/js/material/materialChooseToProduce.js
...resources/template/js/material/materialChooseToProduce.js
+32
-81
erp/src/main/resources/template/tpl/material/materialChooseToProduce.html
...ources/template/tpl/material/materialChooseToProduce.html
+11
-22
web/src/main/resources/template/assets/lib/layui/css/tree-table.css
...in/resources/template/assets/lib/layui/css/tree-table.css
+1
-1
未找到文件。
erp-produce/src/main/resources/template/js/erpBom/erpBomList.js
浏览文件 @
efc3bccf
...
...
@@ -59,9 +59,32 @@ layui.config({
}
});
// 添加
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
_openNewWindows
({
url
:
systemCommonUtil
.
getUrl
(
'
FP2023092900001
'
,
null
),
title
:
systemLanguage
[
"
com.skyeye.addPageTitle
"
][
languageType
],
pageId
:
"
erpBomAdd
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
// 详情
function
details
(
data
)
{
_openNewWindows
({
url
:
"
../../tpl/erpBom/erpBomDetail.html
"
,
title
:
systemLanguage
[
"
com.skyeye.detailsPageTitle
"
][
languageType
],
pageId
:
"
erpBomDetails
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
}
// 编辑
function
edit
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/erpBom/erpBomEdit.html
"
,
title
:
systemLanguage
[
"
com.skyeye.editPageTitle
"
][
languageType
],
...
...
@@ -85,31 +108,6 @@ layui.config({
});
}
// 添加
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
_openNewWindows
({
url
:
"
../../tpl/erpBom/erpBomAdd.html
"
,
title
:
systemLanguage
[
"
com.skyeye.addPageTitle
"
][
languageType
],
pageId
:
"
erpBomAdd
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}});
});
// 详情
function
details
(
data
)
{
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/erpBom/erpBomDetail.html
"
,
title
:
systemLanguage
[
"
com.skyeye.detailsPageTitle
"
][
languageType
],
pageId
:
"
erpBomDetails
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
}
form
.
render
();
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
...
...
erp-produce/src/main/resources/template/js/erpProduction/erpProductionAdd.js
浏览文件 @
efc3bccf
...
...
@@ -49,7 +49,7 @@ layui.config({
//加载bom方案列表
function
loadBomList
(
normsId
){
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
erpbom007
"
,
params
:
{
normsId
:
normsId
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryBomListByNormsId
"
,
params
:
{
normsId
:
normsId
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
$
(
"
#bomList
"
).
html
(
getDataUseHandlebars
(
selTemplate
,
json
));
form
.
render
(
"
select
"
);
//加载bom方案下的子件列表
...
...
erp-produce/src/main/resources/template/js/erpProduction/erpProductionEdit.js
浏览文件 @
efc3bccf
...
...
@@ -100,7 +100,7 @@ layui.config({
//加载bom方案列表
function
loadBomList
(
normsId
){
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
erpbom007
"
,
params
:
{
normsId
:
normsId
},
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryBomListByNormsId
"
,
params
:
{
normsId
:
normsId
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
$
(
"
#bomList
"
).
html
(
getDataUseHandlebars
(
selTemplate
,
json
));
form
.
render
(
"
select
"
);
//加载bom方案下的子件列表
...
...
erp/src/main/resources/template/js/material/materialChooseToProduce.js
浏览文件 @
efc3bccf
var
rowId
=
""
;
layui
.
config
({
base
:
basePath
,
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
...
...
@@ -12,10 +11,11 @@ layui.config({
form
=
layui
.
form
,
table
=
layui
.
table
,
tableCheckBoxUtil
=
layui
.
tableCheckBoxUtil
;
var
selTemplate
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
// 组件使用
// 选择的多商品列表
materialMationList
=
parent
.
materialMationList
;
// 设置提示信息
var
s
=
"
商品选择规则:1.多选;如没有查到要选择的商品,请检查商品信息是否满足当前规则。
"
;
$
(
"
#showInfo
"
).
html
(
s
);
...
...
@@ -31,12 +31,12 @@ layui.config({
function
initTable
(){
var
ids
=
[];
$
.
each
(
materialMationList
,
function
(
i
,
item
)
{
ids
.
push
(
item
.
materialI
d
);
ids
.
push
(
item
.
i
d
);
});
tableCheckBoxUtil
.
init
({
gridId
:
'
messageTable
'
,
filterId
:
'
messageTable
'
,
fieldName
:
'
materialI
d
'
,
fieldName
:
'
i
d
'
,
ids
:
ids
});
...
...
@@ -66,21 +66,14 @@ layui.config({
}},
{
field
:
'
unit
'
,
title
:
'
产品规格类型
'
,
align
:
'
center
'
,
width
:
100
,
templet
:
function
(
d
)
{
return
skyeyeClassEnumUtil
.
getEnumDataNameByCodeAndKey
(
"
materialUnit
"
,
'
id
'
,
d
.
unit
,
'
name
'
);
}},
{
field
:
'
procedureMationList
'
,
title
:
'
工序
'
,
align
:
'
left
'
,
width
:
100
,
templet
:
function
(
d
)
{
var
str
=
""
$
.
each
(
d
.
procedureMationList
,
function
(
i
,
item
)
{
str
+=
'
<span class="layui-badge layui-bg-gray">
'
+
item
.
number
+
'
</span>
'
+
item
.
procedureName
+
'
<br>
'
;
});
return
str
;
}}
}}
]],
done
:
function
(
json
,
curr
,
count
)
{
matchingLanguage
();
// 设置选中
tableCheckBoxUtil
.
checkedDefault
({
gridId
:
'
messageTable
'
,
fieldName
:
'
materialI
d
'
fieldName
:
'
i
d
'
});
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请输入商品名称,型号
"
,
function
()
{
...
...
@@ -88,17 +81,17 @@ layui.config({
});
}
});
form
.
render
();
}
var
$step
=
$
(
"
#step
"
);
$step
.
step
({
index
:
0
,
time
:
500
,
title
:
[
"
选择商品
"
,
"
选择规格
"
]
});
// 下一步
$
(
"
body
"
).
on
(
"
click
"
,
"
#nextTab
"
,
function
()
{
var
selectedData
=
tableCheckBoxUtil
.
getValueList
({
...
...
@@ -115,89 +108,47 @@ layui.config({
$
(
"
#tBody
"
).
html
(
getDataUseHandlebars
(
$
(
"
#tableBody
"
).
html
(),
{
rows
:
materialMationList
}));
// 设置商品来源选中
$
.
each
(
materialMationList
,
function
(
i
,
item
)
{
$
(
"
#type
"
+
item
.
materialI
d
).
val
(
item
.
typeId
);
$
(
"
#type
"
+
item
.
i
d
).
val
(
item
.
typeId
);
});
form
.
render
();
});
// 保存
$
(
"
body
"
).
on
(
"
click
"
,
"
#saveChoose
"
,
function
()
{
var
rows
=
$
(
"
#tBody tr
"
);
var
proList
=
new
Array
();
$
.
each
(
rows
,
function
(
i
,
item
)
{
var
_object
=
$
(
item
);
var
materialId
=
_object
.
attr
(
"
rowid
"
);
var
materialId
=
$
(
item
).
attr
(
"
rowid
"
);
proList
.
push
({
materialId
:
materialId
,
materialName
:
$
(
"
#name
"
+
materialId
).
html
(),
materialModel
:
$
(
"
#model
"
+
materialId
).
html
(),
bomId
:
$
(
"
#bom
"
+
materialId
).
val
(),
normsId
:
$
(
"
#norms
"
+
materialId
).
val
(),
unitName
:
$
(
"
#norms
"
+
materialId
).
find
(
"
option:selected
"
).
text
(),
procedureMationList
:
getProcedureMationList
(
materialId
),
pId
:
'
0
'
,
needNum
:
'
1
'
,
unitPrice
:
getNormsPrice
(
materialId
,
$
(
"
#norms
"
+
materialId
).
val
()),
wastagePrice
:
'
0.00
'
,
type
:
$
(
"
#type
"
+
materialId
).
val
(),
remark
:
''
,
open
:
'
true
'
,
isParent
:
1
normsId
:
$
(
"
#norms
"
+
materialId
).
val
()
});
});
var
params
=
{
proList
:
JSON
.
stringify
(
proList
)
};
AjaxPostUtil
.
request
({
url
:
flowableBasePath
+
"
material015
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
)
{
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
material015
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
parent
.
materialMationList
=
[].
concat
(
json
.
rows
);
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
});
/**
* 获取商品工序
*/
function
getProcedureMationList
(
materialId
)
{
var
proIndex
=
-
1
;
$
.
each
(
materialMationList
,
function
(
i
,
item
)
{
if
(
materialId
==
item
.
materialId
)
{
proIndex
=
i
;
return
false
;
}
});
if
(
proIndex
>=
0
)
{
return
materialMationList
[
proIndex
].
procedureMationList
;
}
else
{
return
new
Array
();
}
}
/**
* 获取指定规格的采购价/成本价
*/
function
getNormsPrice
(
materialId
,
normsId
){
//项目索引
var
proIndex
=
-
1
;
//规格索引
var
normsIndex
=
-
1
;
$
.
each
(
materialMationList
,
function
(
i
,
item
)
{
if
(
materialId
==
item
.
materialId
){
proIndex
=
i
;
$
.
each
(
item
.
unitList
,
function
(
j
,
bean
){
normsIndex
=
j
;
return
false
;
});
return
false
;
}
});
if
(
proIndex
>=
0
&&
normsIndex
>=
0
){
return
materialMationList
[
proIndex
].
unitList
[
normsIndex
].
estimatePurchasePrice
;
form
.
on
(
'
select(unitListChoose)
'
,
function
(
data
)
{
var
materialId
=
data
.
elem
.
id
.
replace
(
"
norms
"
,
""
);
var
value
=
data
.
value
;
if
(
isNull
(
value
))
{
$
(
"
#modelId
"
).
html
(
""
);
}
else
{
return
new
Array
();
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryBomListByNormsId
"
,
params
:
{
normsId
:
value
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
$
(
"
#bom
"
+
materialId
).
html
(
getDataUseHandlebars
(
selTemplate
,
json
));
form
.
render
(
"
select
"
);
}});
}
}
}
);
// 上一步
$
(
"
body
"
).
on
(
"
click
"
,
"
#prevTab
"
,
function
()
{
$step
.
prevStep
();
...
...
@@ -209,11 +160,11 @@ layui.config({
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
function
loadTable
()
{
table
.
reloadData
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
function
refreshTable
(){
table
.
reloadData
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
}
...
...
@@ -221,6 +172,6 @@ layui.config({
function
getTableParams
()
{
return
$
.
extend
(
true
,
{
categoryId
:
categoryId
},
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
}
exports
(
'
materialChooseToProduce
'
,
{});
});
\ No newline at end of file
erp/src/main/resources/template/tpl/material/materialChooseToProduce.html
浏览文件 @
efc3bccf
...
...
@@ -44,16 +44,14 @@
<div
id=
"secondTab"
style=
"display: none;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
<table
class=
"layui-table"
style=
"margin: 0px 10px;"
>
<table
class=
"layui-table"
style=
"margin: 0px 10px;
width: calc(100% - 20px);
"
>
<thead>
<tr>
<th
style=
"width: 100px"
>
商品名称
</th>
<th>
型号
</th>
<th>
所属类型
</th>
<th>
商品来源
</th>
<th>
规格选择
</th>
<th>
商品来源
<i
class=
"red"
>
*
</i></th>
<th>
规格选择
<i
class=
"red"
>
*
</i></th>
<th>
BOM方案选择
</th>
<th>
工序
</th>
</tr>
</thead>
<tbody
id=
"tBody"
>
...
...
@@ -71,36 +69,27 @@
<script
type=
"text/html"
id=
"tableBody"
>
{{
#
each
rows
}}
<
tr
rowid
=
"
{{materialId}}
"
>
<
td
id
=
"
name{{materialId}}
"
>
{{
materialName
}}
<
/td
>
<
td
id
=
"
model{{materialId}}
"
>
{{
materialModel
}}
<
/td
>
<
td
>
{{
categoryName
}}
<
/td
>
<
tr
rowid
=
"
{{id}}
"
>
<
td
id
=
"
name{{id}}
"
>
{{
name
}}
<
/td
>
<
td
id
=
"
model{{id}}
"
>
{{
model
}}
<
/td
>
<
td
>
<
select
lay
-
filter
=
"
typeId
"
lay
-
search
=
""
id
=
"
type{{
materialI
d}}
"
disabled
>
<
select
lay
-
filter
=
"
typeId
"
lay
-
search
=
""
id
=
"
type{{
i
d}}
"
disabled
>
<
option
value
=
"
1
"
>
自产
<
/option
>
<
option
value
=
"
2
"
>
外购
<
/option
>
<
/select
>
<
/td
>
<
td
>
<
select
lay
-
filter
=
"
unitListChoose
"
lay
-
search
=
""
id
=
"
norms{{materialId}}
"
>
{{
#
each
unitList
}}
<
select
lay
-
filter
=
"
unitListChoose
"
lay
-
filter
=
"
unitListChoose
"
win
-
verify
=
"
required
"
lay
-
search
=
""
id
=
"
norms{{id}}
"
>
<
option
value
=
""
>
请选择
<
/option
>
{{
#
each
materialNorms
}}
<
option
value
=
"
{{id}}
"
>
{{
name
}}
<
/option
>
{{
/
each
}}
<
/select
>
<
/td
>
<
td
>
<
select
lay
-
filter
=
"
bomListChoose
"
lay
-
search
=
""
id
=
"
bom{{materialId}}
"
>
<
option
value
=
""
>
全部
<
/option
>
{{
#
each
bomList
}}
<
option
value
=
"
{{id}}
"
>
{{
name
}}
<
/option
>
{{
/
each
}}
<
select
lay
-
filter
=
"
bomListChoose
"
lay
-
search
=
""
id
=
"
bom{{id}}
"
>
<
/select
>
<
/td
>
<
td
>
{{
#
each
procedureMationList
}}
<
span
class
=
"
layui-badge layui-bg-gray
"
>
{{
number
}}
<
/span>{{procedureName}}<br
>
{{
/
each
}}
<
/td
>
<
/tr
>
{{
/
each
}}
</script>
...
...
web/src/main/resources/template/assets/lib/layui/css/tree-table.css
浏览文件 @
efc3bccf
...
...
@@ -40,7 +40,7 @@
.ztree
div
.diy
{
height
:
100%
;
width
:
20
%
;
width
:
17
%
;
line-height
:
30px
;
border-top
:
1px
dotted
#ccc
;
border-left
:
1px
solid
#eeeeee
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录