Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
48521eca
Commit
48521eca
authored
Mar 15, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
9bd6ed6c
b28adf6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
41 deletions
+108
-41
flightChild.vue
src/components/Ticketing/flightChild.vue
+108
-41
No files found.
src/components/Ticketing/flightChild.vue
View file @
48521eca
...
...
@@ -109,6 +109,8 @@
<input
type=
"button"
class=
"hollowFixedBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"resetPageIndex(),getList()"
/>
<input
type=
"button"
class=
"normalBtn"
:value=
"$t('pub.addBtn')"
@
click=
"outerVisible = true,dialogTitle='新增效期'"
/>
<input
type=
"button"
class=
"normalBtn"
value=
"删除"
@
click=
"PostDeleteArray()"
/>
</li>
</ul>
</div>
...
...
@@ -122,7 +124,11 @@
<th>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
:key=
"index"
>
<td><input
type=
"checkbox"
:value=
"item.ID"
/></td>
<td>
<label>
<input
:value=
"item.ID"
style=
"vertical-align: middle;"
v-model=
"DeleteArray"
type=
"checkbox"
>
</label>
</td>
<td>
{{
item
.
FDateStr
}}
</td>
<td>
{{
item
.
Flight_number
}}
</td>
<td>
{{
item
.
CDepartTime
}}
</td>
...
...
@@ -132,6 +138,9 @@
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_edit')"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
@
click=
"outerVisible = true,dialogTitle='修改航班',updateData(item.ID)"
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_edit')"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-delete"
circle
@
click=
"DeleteSingleChild(item)"
></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
...
...
@@ -163,18 +172,14 @@
</td>
<td>
<div
v-if=
"PostData.UpdateType==1"
class=
"FweekList"
v-for=
"subItem in dateObj2"
>
<span>
{{
subItem
.
week
}}
</span>
<el-date-picker
clearable
class=
"w135"
v-model=
"subItem.CDepartTime"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
></el-date-picker>
<el-date-picker
clearable
class=
"w135"
v-model=
"subItem.CArrivalTime"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
></el-date-picker>
<span>
{{
subItem
.
WeekDayStr
}}
</span>
<el-input
class=
"w135"
v-model=
"subItem.CDepartTime"
></el-input>
<el-input
class=
"w135"
v-model=
"subItem.CArrivalTime"
></el-input>
</div>
<div
v-if=
"PostData.UpdateType==2"
class=
"FweekList"
v-for=
"item in dateObj"
>
<el-input
type=
"text"
v-model=
"item.week"
class=
"w60"
></el-input>
<el-date-picker
clearable
class=
"w135"
v-model=
"item.CDepartTime"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
></el-date-picker>
<el-date-picker
clearable
class=
"w135"
v-model=
"item.CArrivalTime"
type=
"date"
value-format=
"yyyy-MM-dd"
:placeholder=
"$t('admin.admin_choDate')"
></el-date-picker>
<div
v-if=
"PostData.UpdateType==2"
class=
"FweekList"
v-for=
"subItem in dateObj"
>
<el-checkbox
@
change=
'changeItem(subItem)'
v-model=
'subItem.CheckStatus'
>
{{
subItem
.
WeekDayStr
}}
</el-checkbox>
<el-input
class=
"w135"
v-model=
"subItem.CDepartTime"
></el-input>
<el-input
class=
"w135"
v-model=
"subItem.CArrivalTime"
></el-input>
</div>
</td>
</tr>
...
...
@@ -210,57 +215,62 @@
FlightId
:
this
.
$route
.
query
.
id
,
//1-全部更新,2,按周一,周二更新
UpdateType
:
1
,
SubList
:
[{
CDepartTime
:
"09:00"
,
CArrivalTime
:
"16:40"
,
//0-全部,1周一...7周日
WeekDay
:
0
}]
SubList
:
[]
},
//删除数组
DeleteArray
:
[],
dialogTitle
:
''
,
dateObj2
:
[{
week
:
'全部'
,
WeekDayStr
:
'全部'
,
WeekDay
:
0
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
}],
dateObj
:
[{
week
:
'周一'
,
WeekDayStr
:
'周一'
,
WeekDay
:
1
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周二'
,
WeekDayStr
:
'周二'
,
WeekDay
:
2
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周三'
,
WeekDayStr
:
'周三'
,
WeekDay
:
3
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周四'
,
WeekDayStr
:
'周四'
,
WeekDay
:
4
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周五'
,
WeekDayStr
:
'周五'
,
WeekDay
:
5
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周六'
,
WeekDayStr
:
'周六'
,
WeekDay
:
6
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
},
{
week
:
'周日'
,
WeekDayStr
:
'周日'
,
WeekDay
:
7
,
CDepartTime
:
''
,
CArrivalTime
:
''
,
CheckStatus
:
false
...
...
@@ -269,34 +279,37 @@
beforeCheck
:
{
disabledDate
:
time
=>
{
let
endTime
=
new
Date
(
this
.
msg
.
Q
EndDate
);
let
endTime
=
new
Date
(
this
.
PostData
.
EndDate
);
return
endTime
.
getTime
()
<
time
.
getTime
();
}
},
afterCheck
:
{
disabledDate
:
time
=>
{
let
startTime
=
new
Date
(
this
.
msg
.
Q
StartDate
);
let
startTime
=
new
Date
(
this
.
PostData
.
StartDate
);
return
startTime
.
getTime
()
>=
time
.
getTime
();
}
},
pickerBeginDateBefore
:
{
disabledDate
:
time
=>
{
let
endTime
=
new
Date
(
this
.
msg
.
QEndDate
)
return
endTime
.
getTime
()
<
time
.
getTime
()
let
endTime
=
new
Date
(
this
.
msg
.
QEndDate
)
return
endTime
.
getTime
()
<
time
.
getTime
()
}
},
pickerBeginDateAfter
:
{
disabledDate
:
time
=>
{
let
startTime
=
new
Date
(
this
.
msg
.
QStartDate
)
return
startTime
.
getTime
()
>=
time
.
getTime
()
let
startTime
=
new
Date
(
this
.
msg
.
QStartDate
)
return
startTime
.
getTime
()
>=
time
.
getTime
()
}
},
airlineList
:
[],
DataList
:
[],
};
},
methods
:
{
changeItem
(
subItem
)
{
subItem
.
CheckStatus
=!
subItem
.
CheckStatus
;
},
//获取列表数据
getList
()
{
this
.
loading
=
true
;
...
...
@@ -307,7 +320,7 @@
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
msg
.
total
=
res
.
data
.
data
.
count
;
this
.
noData
=
!
this
.
total
>
0
;
this
.
noData
=
!
this
.
msg
.
total
>
0
;
this
.
DataList
=
res
.
data
.
data
.
pageData
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
...
...
@@ -318,13 +331,42 @@
},
//提交创建、修改表单
submitForm
(
addMsg
)
{
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
addGroupGuide
();
}
else
{
return
false
;
}
});
this
.
SaveData
();
},
SaveData
()
{
this
.
PostData
.
SubList
=
[];
if
(
this
.
PostData
.
UpdateType
==
1
)
{
this
.
PostData
.
SubList
.
push
(
this
.
dateObj2
[
0
]);
}
else
{
this
.
dateObj
.
forEach
(
item
=>
{
if
(
item
.
CheckStatus
)
{
this
.
PostData
.
SubList
.
push
(
item
);
}
});
}
this
.
apipost
(
"flight_get_SetFlightChild"
,
this
.
PostData
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
PostData
.
StartDate
=
""
;
this
.
PostData
.
EndDate
=
""
;
this
.
PostData
.
UpdateType
=
1
;
this
.
dateObj2
[
0
].
CDepartTime
=
""
;
this
.
dateObj2
[
0
].
CArrivalTime
=
""
;
this
.
dateObj
.
forEach
(
item
=>
{
item
.
CheckStatus
=
false
;
item
.
CDepartTime
=
""
;
item
.
CArrivalTime
=
""
;
});
this
.
getList
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//翻页功能按钮
handleCurrentChange
(
val
)
{
...
...
@@ -336,6 +378,31 @@
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
currentPage
=
1
;
},
DeleteSingleChild
(
item
)
{
this
.
DeleteArray
=
[];
this
.
DeleteArray
.
push
(
item
.
ID
);
this
.
PostDeleteArray
();
},
//删除数组
PostDeleteArray
()
{
var
that
=
this
;
this
.
Confirm
(
"是否删除"
,
function
()
{
that
.
apipost
(
"flight_get_RemoveFlightChild"
,
that
.
DeleteArray
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
that
.
DeleteArray
=
[];
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
});
}
},
mounted
()
{
this
.
getList
();
...
...
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