Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
5c8f8386
Commit
5c8f8386
authored
Mar 13, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动排产
parent
dad2c8e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
85 deletions
+97
-85
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+13
-2
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+81
-80
HPSC007.jsp
src/main/webapp/HP/SC/HPSC007.jsp
+3
-3
No files found.
src/main/webapp/HP/SC/HPSC002.js
View file @
5c8f8386
...
...
@@ -135,15 +135,26 @@ $(function () {
* e.preventDefault 阻止事件发生
*/
beforeAdd
:
function
(
e
)
{
var
lv
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
.
lv
;
var
logic
=
IPLATUI
.
EFTree
.
materialTree
.
selectTreeNode
.
nodeId
?
false
:
true
;
if
(
l
ogic
)
{
// 通过业务逻辑判断, 控制是否进行新增
if
(
l
v
===
3
)
{
IPLAT
.
alert
({
message
:
'<b>
请选择项目列表
</b>'
,
message
:
'<b>
不能在零件下进行新增
</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
e
.
preventDefault
();
}
else
{
if
(
logic
)
{
// 通过业务逻辑判断, 控制是否进行新增
IPLAT
.
alert
({
message
:
'<b>请选择项目列表</b>'
,
okFn
:
function
(
e
)
{
},
title
:
'提示'
});
e
.
preventDefault
();
}
}
},
/**
...
...
src/main/webapp/HP/SC/HPSC003.js
View file @
5c8f8386
...
...
@@ -135,87 +135,87 @@ function showUploadFile(id) {
});
}
function
check
(
id
,
auditStatus
,
planInfoNo
)
{
// const inEiInfo = new EiInfo();
// inEiInfo.set("id", id);
// inEiInfo.set("planInfoNo",planInfoNo);
// //先判断本身是否填写
// EiCommunicator.send('HPSC003', 'getInfo', inEiInfo, {
// onSuccess(ei) {
// var model=ei.get("model");
// if(!(model.planCompletionDate).trim()) {
// NotificationUtil("提交失败!原因:基本信息中计划完成日期未填写", "error");
// return;
// } else {
// //提交
// //提交前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行提交
// if (auditStatus == 1) {
// EiCommunicator.send('HPSC004', 'inspectDetail', inEiInfo, {
// onSuccess(ei) {
// var list=ei.get("list");
// if(list) {
// var count = list[0];
// if (count > 0) {
// NotificationUtil("提交失败!原因:明细信息中有未填写的计划开始时间或计划结束时间", "error");
// } else {
// EiCommunicator.send('HPSC004','queryDetail',inEiInfo,{
// onSuccess(ei){
// var rows = ei.blocks.detail.rows;
// var res = check_time(model,rows);
// if (!res){
// NotificationUtil("计划结束时间应该大于计划开始时间!", "error");
// }
// else {
// // 提交通过,生成
// EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, {
// onSuccess(response) {
// NotificationUtil(response.msg);
// console.log(response)
// autoProductionschedul(response.get('planInfoNo'));
// resultGrid.dataSource.page(1);
// },
// onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error");
// }
// },
// {
// async: false
// }
// );
// }
//
//
// }
// })
//
// }
// } else {
// NotificationUtil("提交失败!未找到明细信息", "error");
// }
// },
// onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error");
// }
// },
// {
// async: false
// }
// );
// } else {
// // 撤回
//
// }
// }
// },
// onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error");
// }
// },
// {
// async: false
// }
// );
const
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"id"
,
id
);
inEiInfo
.
set
(
"planInfoNo"
,
planInfoNo
);
//先判断本身是否填写
EiCommunicator
.
send
(
'HPSC003'
,
'getInfo'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
model
=
ei
.
get
(
"model"
);
if
(
!
(
model
.
planCompletionDate
).
trim
())
{
NotificationUtil
(
"提交失败!原因:基本信息中计划完成日期未填写"
,
"error"
);
return
;
}
else
{
//提交
//提交前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行提交
if
(
auditStatus
==
1
)
{
EiCommunicator
.
send
(
'HPSC004'
,
'inspectDetail'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
list
=
ei
.
get
(
"list"
);
if
(
list
)
{
var
count
=
list
[
0
];
if
(
count
>
0
)
{
NotificationUtil
(
"提交失败!原因:明细信息中有未填写的计划开始时间或计划结束时间"
,
"error"
);
}
else
{
EiCommunicator
.
send
(
'HPSC004'
,
'queryDetail'
,
inEiInfo
,{
onSuccess
(
ei
){
var
rows
=
ei
.
blocks
.
detail
.
rows
;
var
res
=
check_time
(
model
,
rows
);
if
(
!
res
){
NotificationUtil
(
"计划结束时间应该大于计划开始时间!"
,
"error"
);
}
else
{
// 提交通过,生成
EiCommunicator
.
send
(
'HPSC003'
,
'submitPlan'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
console
.
log
(
response
)
autoProductionschedul
(
response
.
get
(
'planInfoNo'
));
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
autoProductionschedul
(
'SCJH24030700006'
);
}
})
}
}
else
{
NotificationUtil
(
"提交失败!未找到明细信息"
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
else
{
// 撤回
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
// autoProductionschedul('SCJH24030700006');
}
/**
...
...
@@ -305,6 +305,7 @@ function saveResult(btn) {
JSUtils
.
submitGridsData
(
"result"
,
"HPSC003"
,
"update"
,
true
);
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
query
();
}
});
}
...
...
src/main/webapp/HP/SC/HPSC007.jsp
View file @
5c8f8386
...
...
@@ -43,14 +43,14 @@
<EF:EFInput
ename=
"productionOrderNo"
type=
"hidden"
/>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
editType=
"date"
cname=
"完成日期"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
editType=
"date"
required=
"true"
cname=
"完成日期"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"hpsc006Id"
cname=
"生产下料ID"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"userId"
cname=
"完成人"
width=
"100"
align=
"center"
filter=
"contains"
readonly=
"true"
>
filter=
"contains"
readonly=
"true"
required=
"true"
>
<EF:EFOptions
blockId=
"worker_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"userName"
cname=
"完成名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"actualCompletionNum"
cname=
"完成数量"
format=
"{0:N3}"
maxLength=
"12"
displayType=
"0.000"
<EF:EFColumn
ename=
"actualCompletionNum"
cname=
"完成数量"
required=
"true"
format=
"{0:N3}"
maxLength=
"12"
displayType=
"0.000"
data-regex=
"/^-?[0-9]{1,9}$/"
data-errorprompt=
"请输入数字,该值最大可设置9位整数!"
/>
<EF:EFColumn
ename=
"actualCompletionTotalWt"
cname=
"完成重量(T)"
enable=
"false"
format=
"{0:N3}"
maxLength=
"12"
displayType=
"0.000"
...
...
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