Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
ec6f9f5d
Commit
ec6f9f5d
authored
Aug 10, 2023
by
yangzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:预计完成时间
parent
b81f421e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
21 deletions
+39
-21
src/views/taskManage/index.vue
+39
-21
No files found.
src/views/taskManage/index.vue
View file @
ec6f9f5d
...
...
@@ -527,11 +527,11 @@
width=
'500px'
:close-on-click-modal=
'false'
>
<el-form
size=
'mini'
>
<el-form-item
label=
'预计完成时间'
>
<el-form
size=
'mini'
:rules=
'addRules'
:model=
'ruleForm'
ref=
'ruleForm'
>
<el-form-item
label=
'预计完成时间'
prop=
'estimateCompleteTime'
>
<el-date-picker
style=
'width: 100%'
v-model=
'estimateCompleteTime'
v-model=
'
ruleForm.
estimateCompleteTime'
value-format=
'yyyy-MM-dd HH:mm:ss'
type=
'datetime'
default-time=
'23:59:59'
...
...
@@ -725,10 +725,28 @@ export default {
},
data
()
{
const
userInfo
=
localStorage
.
getItem
(
'user'
)
var
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
const
start
=
new
Date
(
value
)
if
(
!
value
)
{
callback
(
new
Error
(
'请选择预计完成时间'
))
}
else
if
(
start
<
Date
.
now
())
{
callback
(
new
Error
(
'预计完成时间要大于当前时间!'
))
}
else
{
callback
()
}
}
return
{
addRules
:
{
estimateCompleteTime
:
[
{
validator
:
validatePass2
,
trigger
:
'blur'
,
},
],
},
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
},
},
assignFormRules
:
{
...
...
@@ -808,7 +826,9 @@ export default {
cloneForm
:
{},
editDialog
:
false
,
completeVisible
:
false
,
estimateCompleteTime
:
''
,
ruleForm
:
{
estimateCompleteTime
:
''
,
},
currentItem
:
null
,
acceptVisible
:
false
,
acceptFormRules
:
{
...
...
@@ -1342,7 +1362,7 @@ export default {
},
// 开始工单
async
startWorkOrder
(
item
)
{
this
.
estimateCompleteTime
=
''
this
.
ruleForm
.
estimateCompleteTime
=
''
this
.
completeVisible
=
true
this
.
rowId
=
item
.
id
this
.
currentItem
=
item
...
...
@@ -1576,22 +1596,20 @@ export default {
}
},
async
submitTime
()
{
if
(
!
this
.
estimateCompleteTime
)
{
return
this
.
$message
.
warning
(
'请选择预计完成时间'
)
}
try
{
const
res
=
await
startWorder
(
this
.
rowId
,
this
.
estimateCompleteTime
,
)
if
(
res
.
code
===
200
)
{
this
.
getlist
()
this
.
getOrderTree
()
this
.
completeVisible
=
false
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
startWorder
(
this
.
rowId
,
this
.
ruleForm
.
estimateCompleteTime
,
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
getlist
(
)
this
.
getOrderTree
()
this
.
completeVisible
=
false
}
})
}
}
catch
(
e
)
{
console
.
error
(
e
)
}
})
},
async
reply
()
{
if
(
!
this
.
textarea
)
{
...
...
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