Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
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
mes
mes-ui
Commits
bd95e8ce
Commit
bd95e8ce
authored
May 16, 2025
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 生产打样下单日期选择器细节优化
parent
850d3c8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
+30
-11
index.vue
src/views/mes/pro/scheduleList/index.vue
+7
-5
commandList.vue
src/views/mes/pro/workorder/commandList.vue
+23
-6
No files found.
src/views/mes/pro/scheduleList/index.vue
View file @
bd95e8ce
...
...
@@ -290,7 +290,6 @@
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择计划开始时间"
:picker-options=
"pickerOptions"
@
focus=
"writeRow(scope.row)"
@
change=
"editTime(scope.row, 'start')"
>
...
...
@@ -316,7 +315,6 @@
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择计划结束时间"
:picker-options=
"pickerOptions"
@
focus=
"writeRow(scope.row)"
@
change=
"editTime(scope.row, 'end')"
>
...
...
@@ -992,6 +990,12 @@ export default {
this
.
editTimeLast
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
},
editTime
(
row
,
type
){
const
startTime
=
new
Date
(
this
.
editTimeLast
.
scheduleStartDate
).
getTime
()
+
3
*
60
*
1000
;
const
endTime
=
new
Date
(
this
.
editTimeLast
.
scheduleEndDate
).
getTime
()
+
3
*
60
*
1000
;
const
nowTime
=
new
Date
().
getTime
();
if
(
startTime
<
nowTime
||
endTime
<
nowTime
)
{
return
this
.
$message
.
warning
(
'手工排产时间不得早于当前时间!'
);
}
const
scheduleStartDate
=
dayjs
(
this
.
editTimeLast
.
scheduleStartDate
)
const
scheduleEndDate
=
dayjs
(
this
.
editTimeLast
.
scheduleEndDate
)
if
(
type
===
'start'
)
{
...
...
@@ -1002,9 +1006,7 @@ export default {
console
.
log
(
'duration'
,
duration
)
row
.
scheduleStartDate
=
dayjs
(
row
.
scheduleEndDate
).
add
(
duration
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
console
.
log
(
scheduleStartDate
)
console
.
log
(
scheduleEndDate
)
// this.submitForm(row)
this
.
submitForm
(
row
)
},
/** 搜索按钮操作 */
handleWorkunitQuery
()
{
...
...
src/views/mes/pro/workorder/commandList.vue
View file @
bd95e8ce
...
...
@@ -36,7 +36,6 @@
style=
"width: 100%;"
placeholder=
"请选择计划开始时间"
format =
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
...
...
@@ -52,8 +51,9 @@
style=
"width: 100%;"
placeholder=
"请选择计划结束时间"
format =
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
value-format=
"yyyy-MM-dd HH:mm:ss"
@
change=
"editTime(scope.row, 'end')"
>
</el-date-picker>
</el-form-item>
</
template
>
...
...
@@ -137,8 +137,8 @@ export default {
this
.
tableForm
.
tableData
=
response
.
rows
.
map
(
item
=>
{
return
{
...
item
,
scheduleStartTime
:
this
.
$attrs
.
currentData
.
requestDate
?
this
.
$attrs
.
currentData
.
requestDate
+
' 00:00:00'
:
null
,
scheduleEndTime
:
this
.
$attrs
.
currentData
.
requestDate
?
this
.
$attrs
.
currentData
.
requestDate
+
' 00:00:00'
:
null
scheduleStartTime
:
this
.
$attrs
.
currentData
.
requestDate
?
this
.
$attrs
.
currentData
.
requestDate
:
null
,
scheduleEndTime
:
this
.
$attrs
.
currentData
.
requestDate
?
this
.
$attrs
.
currentData
.
requestDate
:
null
}
})
this
.
loading
=
false
;
...
...
@@ -177,7 +177,14 @@ export default {
let
params
=
{
workorderId
:
this
.
$attrs
.
workorderId
}
let
flag
=
false
;
params
.
processData
=
this
.
tableForm
.
tableData
.
map
(
item
=>
{
const
startTime
=
new
Date
(
item
.
scheduleStartTime
).
getTime
()
+
3
*
60
*
1000
;
const
endTime
=
new
Date
(
item
.
scheduleEndTime
).
getTime
()
+
3
*
60
*
1000
;
const
nowTime
=
new
Date
().
getTime
();
if
(
startTime
<
nowTime
||
endTime
<
nowTime
)
{
flag
=
true
;
}
return
{
"scheduleEndTime"
:
item
.
scheduleEndTime
,
"scheduleStartTime"
:
item
.
scheduleStartTime
,
...
...
@@ -185,7 +192,10 @@ export default {
"workunitId"
:
item
.
workunitId
}
})
console
.
log
(
params
)
// console.log(params)
if
(
flag
)
{
return
this
.
$message
.
warning
(
'手工排产时间不得早于当前时间!'
);
}
workorderProofMakeProduction
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$emit
(
'close'
)
...
...
@@ -197,6 +207,13 @@ export default {
}
})
},
editTime
(
row
){
const
startTime
=
new
Date
(
row
.
scheduleStartTime
).
getTime
();
const
endTime
=
new
Date
(
row
.
scheduleEndTime
).
getTime
();
if
(
startTime
>
endTime
)
{
return
this
.
$message
.
warning
(
'计划结束时间不能小于计划开始时间!'
);
}
}
},
};
</
script
>
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