Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
4fdf9d5e
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1195
Star
154
Fork
127
代码
文件
提交
分支
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看板
提交
4fdf9d5e
编写于
1月 23, 2022
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ERP进度报表修改
上级
0309c5f7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
216 addition
and
216 deletion
+216
-216
erp/src/main/resources/template/js/erpcommon/erpOrderFlowLine.js
.../main/resources/template/js/erpcommon/erpOrderFlowLine.js
+216
-216
未找到文件。
erp/src/main/resources/template/js/erpcommon/erpOrderFlowLine.js
浏览文件 @
4fdf9d5e
...
...
@@ -6,233 +6,233 @@ layui.config({
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
orgChart
'
],
function
(
exports
)
{
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
orgChart
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
$
=
layui
.
$
;
var
orderId
=
GetUrlParam
(
"
rowId
"
);
var
type
=
GetUrlParam
(
"
type
"
);
// 加载订单流水线信息
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
erpcommon002
"
,
params
:
{
rowId
:
orderId
,
type
:
type
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
data
)
{
if
(
data
.
returnCode
==
0
)
{
var
newData
=
dealWithData
(
data
.
bean
);
$
(
'
#chart-container
'
).
orgchart
({
'
data
'
:
newData
,
'
nodeTitle
'
:
'
title
'
,
'
nodeContent
'
:
'
name
'
,
'
pan
'
:
true
,
'
zoom
'
:
true
,
'
parentNodeSymbol
'
:
'
fa-receipt
'
,
'
interactive
'
:
false
});
form
.
render
();
$
(
"
#chart-container
"
).
on
(
"
click
"
,
"
.node
"
,
function
()
{
rowId
=
$
(
this
).
attr
(
"
id
"
);
if
(
isNull
(
rowId
)){
parent
.
$
(
"
#orderMationLi
"
).
click
();
return
false
;
}
var
type
=
$
(
this
).
find
(
"
.customName
"
).
attr
(
"
type
"
);
var
url
=
erpOrderUtil
.
getErpDetailUrl
({
subType
:
type
});
if
(
isNull
(
url
)){
return
false
;
}
_openNewWindows
({
url
:
url
,
title
:
"
单据详情
"
,
pageId
:
"
orderDetails
"
,
area
:
[
'
100vw
'
,
'
100vh
'
],
callBack
:
function
(
refreshCode
){
}});
});
}
else
{
winui
.
window
.
msg
(
data
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
function
dealWithData
(
bean
){
bean
.
title
=
'
<a type="
'
+
bean
.
subType
+
'
" class="customName">
'
+
bean
.
title
+
'
</a>
'
;
bean
.
name
=
'
<div>
'
+
bean
.
name
+
'
</div>
'
+
'
<div class="orgIcon"><font class="left-font">状态:</font>
'
+
getStateIcon
(
bean
.
subType
,
bean
.
state
)
+
'
</div>
'
+
'
<div class="fontMation"><font class="left-font">计划完成时间:</font><font class="right-font">
'
+
getDataMation
(
bean
.
planComplateDate
)
+
'
</font></div>
'
+
'
<div class="fontMation"><font class="left-font">实际完成时间:</font><font class="right-font">
'
+
getDataMation
(
bean
.
realComplateDate
)
+
'
</font></div>
'
;
if
(
!
isNull
(
bean
.
children
)
&&
bean
.
children
.
length
>
0
)
{
$
.
each
(
bean
.
children
,
function
(
i
,
item
)
{
bean
.
children
[
i
]
=
dealWithData
(
item
);
});
}
return
bean
;
var
$
=
layui
.
$
,
form
=
layui
.
form
;
var
orderId
=
GetUrlParam
(
"
rowId
"
);
var
type
=
GetUrlParam
(
"
type
"
);
// 加载订单流水线信息
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
erpcommon002
"
,
params
:
{
rowId
:
orderId
,
type
:
type
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
data
)
{
if
(
data
.
returnCode
==
0
)
{
var
newData
=
dealWithData
(
data
.
bean
);
$
(
'
#chart-container
'
).
orgchart
({
'
data
'
:
newData
,
'
nodeTitle
'
:
'
title
'
,
'
nodeContent
'
:
'
name
'
,
'
pan
'
:
true
,
'
zoom
'
:
true
,
'
parentNodeSymbol
'
:
'
fa-receipt
'
,
'
interactive
'
:
false
});
form
.
render
();
$
(
"
#chart-container
"
).
on
(
"
click
"
,
"
.node
"
,
function
()
{
rowId
=
$
(
this
).
attr
(
"
id
"
);
if
(
isNull
(
rowId
)){
parent
.
$
(
"
#orderMationLi
"
).
click
();
return
false
;
}
var
type
=
$
(
this
).
find
(
"
.customName
"
).
attr
(
"
type
"
);
var
url
=
erpOrderUtil
.
getErpDetailUrl
({
subType
:
type
});
if
(
isNull
(
url
)){
return
false
;
}
_openNewWindows
({
url
:
url
,
title
:
"
单据详情
"
,
pageId
:
"
orderDetails
"
,
area
:
[
'
100vw
'
,
'
100vh
'
],
callBack
:
function
(
refreshCode
){
}});
});
}
else
{
winui
.
window
.
msg
(
data
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
function
getStateIcon
(
subType
,
state
){
var
icon
=
""
;
if
(
subType
==
10
||
subType
==
11
){
// 采购订单,销售订单
icon
=
getErpOrderHeaderState
(
state
);
}
else
if
(
subType
==
1
||
subType
==
5
||
subType
==
15
){
// 采购入库,销售出库,验收入库单
icon
=
getErpHeaderState
(
state
);
}
else
if
(
subType
==
16
){
//加工单子单据(工序验收单)
icon
=
getErpMachinChildState
(
state
);
}
else
if
(
subType
==
17
){
//加工单
icon
=
getErpMachinHeaderState
(
state
);
}
else
if
(
subType
==
18
){
//生产计划单
icon
=
getErpProductionHeaderState
(
state
);
}
else
if
(
subType
==
19
||
subType
==
20
||
subType
==
21
){
//领料单/退料单/补料单
icon
=
getErpPickHeaderState
(
state
);
}
var
stateName
=
getStateName
(
icon
);
icon
=
getStateCustom
(
icon
);
icon
=
'
<i class="fa fa-fw
'
+
icon
+
'
" title="
'
+
stateName
+
'
"></i>
'
;
return
icon
;
}});
function
dealWithData
(
bean
){
bean
.
title
=
'
<a type="
'
+
bean
.
subType
+
'
" class="customName">
'
+
bean
.
title
+
'
</a>
'
;
bean
.
name
=
'
<div>
'
+
bean
.
name
+
'
</div>
'
+
'
<div class="orgIcon"><font class="left-font">状态:</font>
'
+
getStateIcon
(
bean
.
subType
,
bean
.
state
)
+
'
</div>
'
+
'
<div class="fontMation"><font class="left-font">计划完成时间:</font><font class="right-font">
'
+
getDataMation
(
bean
.
planComplateDate
)
+
'
</font></div>
'
+
'
<div class="fontMation"><font class="left-font">实际完成时间:</font><font class="right-font">
'
+
getDataMation
(
bean
.
realComplateDate
)
+
'
</font></div>
'
;
if
(
!
isNull
(
bean
.
children
)
&&
bean
.
children
.
length
>
0
)
{
$
.
each
(
bean
.
children
,
function
(
i
,
item
)
{
bean
.
children
[
i
]
=
dealWithData
(
item
);
});
}
function
getDataMation
(
data
){
if
(
isNull
(
data
)){
return
''
;
}
return
data
;
return
bean
;
}
function
getStateIcon
(
subType
,
state
){
var
icon
=
""
;
if
(
subType
==
10
||
subType
==
11
){
// 采购订单,销售订单
icon
=
getErpOrderHeaderState
(
state
);
}
else
if
(
subType
==
1
||
subType
==
5
||
subType
==
15
){
// 采购入库,销售出库,验收入库单
icon
=
getErpHeaderState
(
state
);
}
else
if
(
subType
==
17
){
//加工单子单据(工序验收单)
icon
=
getErpMachinChildState
(
state
);
}
else
if
(
subType
==
16
){
//加工单
icon
=
getErpMachinHeaderState
(
state
);
}
else
if
(
subType
==
18
){
//生产计划单
icon
=
getErpProductionHeaderState
(
state
);
}
else
if
(
subType
==
19
||
subType
==
20
||
subType
==
21
){
// 领料单/补料单/退料单
icon
=
getErpPickHeaderState
(
state
);
}
/**
* 获取中文对应汉字
* @param icon
* @returns {string}
*/
function
getStateName
(
icon
){
if
(
icon
==
'
fa-spinner fa-spin
'
){
return
'
执行中
'
;
}
else
if
(
icon
==
'
fa-times-circle
'
){
return
'
执行异常
'
;
}
else
if
(
icon
==
'
fa-check-circle
'
){
return
'
完成
'
;
}
var
stateName
=
getStateName
(
icon
);
icon
=
getStateCustom
(
icon
);
icon
=
'
<i class="fa fa-fw
'
+
icon
+
'
" title="
'
+
stateName
+
'
"></i>
'
;
return
icon
;
}
function
getDataMation
(
data
){
if
(
isNull
(
data
)){
return
''
;
}
/**
* 拼接状态颜色属性
* @param icon
* @returns {string}
*/
function
getStateCustom
(
icon
){
if
(
icon
==
'
fa-spinner fa-spin
'
){
return
icon
+
'
running
'
;
}
else
if
(
icon
==
'
fa-times-circle
'
){
return
icon
+
'
error
'
;
}
else
if
(
icon
==
'
fa-check-circle
'
){
return
icon
+
'
success
'
;
}
return
data
;
}
/**
* 获取中文对应汉字
* @param icon
* @returns {string}
*/
function
getStateName
(
icon
){
if
(
icon
==
'
fa-spinner fa-spin
'
){
return
'
执行中
'
;
}
else
if
(
icon
==
'
fa-times-circle
'
){
return
'
执行异常
'
;
}
else
if
(
icon
==
'
fa-check-circle
'
){
return
'
完成
'
;
}
/**
* erp订单状态
*
* @param state
* @returns {string}
*/
function
getErpOrderHeaderState
(
state
){
var
icon
=
""
;
// 0未审核、1.审核中、2.审核通过、3.审核拒绝、4.已转入库|出库,已完成
if
(
state
==
0
||
state
==
1
||
state
==
2
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
}
/**
* 拼接状态颜色属性
* @param icon
* @returns {string}
*/
function
getStateCustom
(
icon
){
if
(
icon
==
'
fa-spinner fa-spin
'
){
return
icon
+
'
running
'
;
}
else
if
(
icon
==
'
fa-times-circle
'
){
return
icon
+
'
error
'
;
}
else
if
(
icon
==
'
fa-check-circle
'
){
return
icon
+
'
success
'
;
}
/**
* erp出入库订单状态
*
* @param state
* @returns {string}
*/
function
getErpHeaderState
(
state
){
var
icon
=
""
;
// 0未审核、1.审核中、2.审核通过、3.审核拒绝、4.已转入库|出库,已完成
if
(
state
==
0
||
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
2
||
state
==
4
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
}
/**
* erp订单状态
*
* @param state
* @returns {string}
*/
function
getErpOrderHeaderState
(
state
){
var
icon
=
""
;
// 0未审核、1.审核中、2.审核通过、3.审核拒绝、4.已转入库|出库,已完成
if
(
state
==
0
||
state
==
1
||
state
==
2
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-check-circle
"
;
}
/**
* 加工单状态
* @param state
* @returns {string}
*/
function
getErpMachinHeaderState
(
state
){
var
icon
=
""
;
// 状态 1.新建 2.审核中 3.审核通过 4.审核拒绝 5.已完成
if
(
state
==
1
||
state
==
2
||
state
==
3
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
5
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
return
icon
;
}
/**
* erp出入库订单状态
*
* @param state
* @returns {string}
*/
function
getErpHeaderState
(
state
){
var
icon
=
""
;
// 0未审核、1.审核中、2.审核通过、3.审核拒绝、4.已转入库|出库,已完成
if
(
state
==
0
||
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
2
||
state
==
4
){
icon
=
"
fa-check-circle
"
;
}
/**
* 加工单子单据状态
* @param state
* @returns {string}
*/
function
getErpMachinChildState
(
state
){
var
icon
=
""
;
// 状态 1.待验收 2.验收完成
if
(
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
2
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
return
icon
;
}
/**
* 加工单状态
* @param state
* @returns {string}
*/
function
getErpMachinHeaderState
(
state
){
var
icon
=
""
;
// 状态 1.新建 2.审核中 3.审核通过 4.审核拒绝 5.已完成
if
(
state
==
1
||
state
==
2
||
state
==
3
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
5
){
icon
=
"
fa-check-circle
"
;
}
/**
* 生产计划单状态
* @param state
* @returns {string}
*/
function
getErpProductionHeaderState
(
state
){
var
icon
=
""
;
// 状态 0.删除 1.新建 2.审核中 3.审核通过 4.审核不通过 5.加工完成
if
(
state
==
1
||
state
==
2
||
state
==
3
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
5
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
return
icon
;
}
/**
* 加工单子单据状态
* @param state
* @returns {string}
*/
function
getErpMachinChildState
(
state
){
var
icon
=
""
;
// 状态 1.待验收 2.验收完成
if
(
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
2
){
icon
=
"
fa-check-circle
"
;
}
/**
* 领料单/退料单/补料单状态
* @param state
* @returns {string}
*/
function
getErpPickHeaderState
(
state
){
var
icon
=
""
;
// 状态 0未审核 1.审核中 2.审核通过-进行领料和退料 3.审核拒绝
if
(
state
==
0
||
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
2
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
return
icon
;
}
/**
* 生产计划单状态
* @param state
* @returns {string}
*/
function
getErpProductionHeaderState
(
state
){
var
icon
=
""
;
// 状态 0.删除 1.新建 2.审核中 3.审核通过 4.审核不通过 5.加工完成
if
(
state
==
1
||
state
==
2
||
state
==
3
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
4
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
5
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
}
/**
* 领料单/退料单/补料单状态
* @param state
* @returns {string}
*/
function
getErpPickHeaderState
(
state
){
var
icon
=
""
;
// 状态 0未审核 1.审核中 2.审核通过-进行领料和退料 3.审核拒绝
if
(
state
==
0
||
state
==
1
){
icon
=
"
fa-spinner fa-spin
"
;
}
else
if
(
state
==
3
){
icon
=
"
fa-times-circle
"
;
}
else
if
(
state
==
2
){
icon
=
"
fa-check-circle
"
;
}
return
icon
;
}
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录