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
085e4cfc
Commit
085e4cfc
authored
Jun 06, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增车页面
parent
df496f6a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
311 additions
and
11 deletions
+311
-11
HPTripPlan.vue
src/components/busManagement/HPTripPlan.vue
+92
-11
editTripPlan.vue
src/components/busManagement/editTripPlan.vue
+219
-0
No files found.
src/components/busManagement/HPTripPlan.vue
View file @
085e4cfc
<
style
scoped
>
.tripPlanTab
{
border-collapse
:
collapse
;
}
.tripPlanTab
tr
th
,
.tripPlanTab
tr
td
{
border
:
1px
solid
gray
;
text-align
:
center
;
padding-left
:
1px
;
padding-right
:
1px
;
}
.tripPlanTab
tr
th
{
min-width
:
55px
;
height
:
40px
;
line-height
:
40px
;
}
.tripPlanTab
tr
td
{
height
:
28px
;
line-height
:
28px
;
}
</
style
>
<
template
>
<div>
<div
class=
"query-box"
style=
"border-bottom: none;"
>
...
...
@@ -10,21 +36,24 @@
</li>
<li>
<input
type=
"button"
class=
"normalBtn"
:value=
"$t('pub.searchBtn')"
@
click=
"getList()"
/>
<button
class=
"hollowFixedBtn"
@
click=
"editPlan(null)"
>
{{
$t
(
'pub.addBtn'
)
}}
</button>
</li>
</ul>
</div>
<div
style=
"width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; "
class=
"ownScrollbarStyle
"
>
<table
v-loading=
"loading"
class=
"
"
>
<div
style=
"width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; min-hei"
class=
"ownScrollbarStyle"
v-loading=
"loading
"
>
<table
class=
"tripPlanTab"
v-if=
"dataList&&dataList.length>0
"
>
<thead>
<tr>
<th
style=
"text-align:center;"
>
<th>
{{
msg
.
MonthStr
}}
</th>
<template
v-if=
"headerList&&headerList.length>0"
>
<template
v-for=
"(hItem,hIndex) in headerList"
>
<th
:key=
"`h_`+hIndex"
style=
"width:50px;text-align:center;"
>
<th
:key=
"`h_`+hIndex"
>
{{
hItem
.
DayStr
}}
<br
/>
{{
hItem
.
WeekStr
}}
</th>
</
template
>
</template>
...
...
@@ -32,17 +61,53 @@
</thead>
<tbody
v-for=
"(item,index) in dataList"
:key=
"`d_`+index"
>
<tr>
<td
style=
"text-align:center;
"
>
<td
rowspan=
"2
"
>
{{item.CarName}}
<br
/>
{{item.CarNo}}
</td>
<
template
v-for=
"(subItem,subIndex) in item.SubList"
>
<td>
<template
v-if=
"subItem.DayObj"
>
<template
v-if=
"subItem.DayObj.UseType==1"
>
<font>
接机
</font>
</
template
>
<
template
v-if=
"subItem.DayObj.UseType==2"
>
<font>
送机
</font>
</
template
>
<
template
v-if=
"subItem.DayObj.UseType==3"
>
<font>
全天
</font>
</
template
>
<
template
v-if=
"subItem.DayObj.UseType==4"
>
<font>
X
</font>
</
template
>
</template>
</td>
</template>
</tr>
<tr>
<
template
v-for=
"(subItem,subIndex) in item.SubList"
>
<template
v-if=
"subItem.DayObj"
>
<td
v-if=
"subItem.DayObj.DayNum==1"
:colspan=
"subItem.DayObj.ColumnNum"
>
{{
subItem
.
DayObj
.
DMCNum
}}
{{
subItem
.
DayObj
.
InOut
}}
</td>
</
template
>
<
template
v-else
>
<td>
</td>
</
template
>
</template>
</tr>
</tbody>
</table>
</div>
<el-dialog
class=
"app-attachment-dialog"
width=
"1000"
:title=
"dialogTitle"
:visible
.
sync=
"isShowEditPlanDialog"
:close-on-click-modal=
"false"
>
<editTripPlan
v-if=
"isShowEditPlanDialog"
:editMsg=
"editMsg"
@
success=
"getList"
></editTripPlan>
</el-dialog>
</div>
</template>
<
script
>
import
editTripPlan
from
"./editTripPlan"
;
//新增修改团队用车
export
default
{
data
()
{
return
{
...
...
@@ -52,14 +117,34 @@
},
headerList
:
[],
//表头
dataList
:
[],
Q_PlanId
:
0
,
editMsg
:
{
MonthStr
:
""
,
Q_PlanId
:
0
,
},
isShowEditPlanDialog
:
false
,
//是否显示新增修改
dialogTitle
:
""
,
}
},
components
:
{
editTripPlan
},
methods
:
{
//新增团队行程用车
editPlan
(
item
)
{
this
.
editMsg
.
MonthStr
=
this
.
msg
.
MonthStr
;
if
(
item
)
{
this
.
dialogTitle
=
"修改"
;
this
.
editMsg
.
Q_PlanId
=
item
.
PlanId
;
}
else
{
this
.
dialogTitle
=
"新增"
;
this
.
editMsg
.
Q_PlanId
=
0
;
}
this
.
isShowEditPlanDialog
=
true
;
},
getList
()
{
this
.
loading
=
true
;
this
.
isShowEditPlanDialog
=
false
;
this
.
dataList
=
[];
this
.
headerList
=
[];
this
.
apipost
(
'travel_post_GetTripCarPlanList'
,
this
.
msg
,
res
=>
{
...
...
@@ -86,7 +171,3 @@
}
</
script
>
<
style
>
</
style
>
src/components/busManagement/editTripPlan.vue
0 → 100644
View file @
085e4cfc
<
style
scoped
>
</
style
>
<
template
>
<div
class=
"editTripPlan"
>
<el-form
:model=
"postMsg"
ref=
"form"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"用车类型"
>
<el-radio
v-model=
"postMsg.PlanType"
:label=
"1"
>
内部用车
</el-radio>
<el-radio
v-model=
"postMsg.PlanType"
:label=
"2"
>
外部用车
</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"选择团号"
>
<el-select
v-model=
"postMsg.TCID"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"getPriceTrip()"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
<el-option
v-for=
"item in priceList"
:label=
"item.TCNUM"
:value=
"item.TCID"
:key=
"item.TCID"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"开始日期"
>
<el-date-picker
type=
"date"
v-model=
"postMsg.StartDate"
value-format=
"yyyy-MM-dd"
placeholder
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"结束日期"
>
<el-date-picker
type=
"date"
v-model=
"postMsg.EndDate"
value-format=
"yyyy-MM-dd"
placeholder
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"车牌号"
>
<el-select
v-model=
"postMsg.CarId"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
"0"
></el-option>
<el-option
v-for=
"item in carList"
:label=
"item.CarName+`(`+item.CarNo+`)`"
:value=
"item.Id"
:key=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"进出点"
>
<el-input
v-model=
"postMsg.InOut"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"postMsg.Remark"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
class=
"ImpressionTicketing-OuterFrame"
label-width=
"0px"
>
<div>
<span
class=
"ImpressionTicketing-title"
>
用车详情
</span>
<span
class=
"el-icon-circle-plus-outline itc-outline"
></span>
</div>
</el-form-item>
</el-col>
</el-row>
<template
v-for=
"(item,index) in postMsg.DetailsList"
>
<el-row
:key=
"index"
>
<el-col
:span=
"4"
>
<el-form-item
label=
""
label-position=
"left"
>
第
{{
item
.
DayNum
}}
天
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"用车类型"
label-width=
"100px"
label-position=
"left"
>
<el-select
v-model=
"item.UseType"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
label=
"接机"
:value=
"1"
></el-option>
<el-option
label=
"送机"
:value=
"2"
></el-option>
<el-option
label=
"全天"
:value=
"3"
></el-option>
<el-option
label=
"不用车"
:value=
"4"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"用车备注"
label-position=
"left"
>
<el-input
v-model=
"item.DRemark"
></el-input>
</el-form-item>
<!--
<span
@
click=
"addRule()"
class=
"el-icon-circle-plus-outline itc-outline"
></span>
<span
@
click=
"deleteRule(item,index)"
class=
"el-icon-delete itc-delete"
></span>
-->
</el-col>
</el-row>
</
template
>
<el-row
type=
"flex"
justify=
"center"
>
<el-button
@
click=
"closeForm()"
>
{{$t('pub.closeSel')}}
</el-button>
<el-button
@
click=
"saveTripPlan"
type=
"primary"
:loading=
"saveLoading"
>
{{$t('pub.saveBtn')}}
</el-button>
</el-row>
</el-form>
</div>
</template>
<
script
>
export
default
{
props
:
[
"editMsg"
],
components
:
{},
data
()
{
return
{
loading
:
false
,
postMsg
:
{
PlanId
:
0
,
//计划Id
TCID
:
0
,
//团队编号
PlanType
:
1
,
//用车类型(1-内部用车,2-外部用车)
StartDate
:
""
,
//用车开始时间
EndDate
:
""
,
//用车结束时间
Remark
:
""
,
//备注
CarId
:
0
,
//车Id,
InOut
:
""
,
//进出点
DetailsList
:
[]
},
priceList
:
[],
//价格列表
carList
:
[],
//车辆列表
userInfo
:
{},
saveLoading
:
false
,
};
},
created
()
{
this
.
userInfo
=
this
.
getLocalStorage
();
this
.
getCarList
();
},
mounted
()
{
if
(
this
.
editMsg
&&
this
.
editMsg
.
MonthStr
)
{
this
.
getPriceList
();
}
},
watch
:
{
editMsg
:
{
handler
(
val
,
oldVal
)
{
this
.
getPriceList
();
},
},
},
methods
:
{
//获取车辆列表
getCarList
()
{
this
.
apipost
(
"travel_post_GetJapanCarList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
carList
=
res
.
data
.
data
;
}
});
},
//获取月份下的团队列表
getPriceList
()
{
var
pMsg
=
{
MonthStr
:
this
.
editMsg
.
MonthStr
}
this
.
apipost
(
'travel_post_GetTravelPriceListByMonth'
,
pMsg
,
res
=>
{
console
.
log
(
"travel_post_GetTravelPriceListByMonth"
,
res
)
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
priceList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
getDetailsObj
()
{
var
dObj
=
{
DetailId
:
0
,
//详情Id
PlanId
:
0
,
//主表计划Id
DayNum
:
0
,
//第几天
UseType
:
1
,
//用车类型(1-接机,2-送机,3-全天,4-不用车)
DRemark
:
""
,
//用车备注
}
return
dObj
;
},
//切换团号
getPriceTrip
()
{
if
(
this
.
postMsg
.
TCID
>
0
)
{
var
priceMsg
=
{
TCID
:
this
.
postMsg
.
TCID
};
this
.
apipost
(
"travel_post_GetPriceTripPlan"
,
priceMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
if
(
tempData
)
{
this
.
postMsg
.
StartDate
=
tempData
.
StartDate
;
this
.
postMsg
.
EndDate
=
tempData
.
EndDate
;
this
.
postMsg
.
InOut
=
tempData
.
InOut
;
if
(
tempData
.
DetailsList
&&
tempData
.
DetailsList
.
length
>
0
)
{
this
.
postMsg
.
DetailsList
=
tempData
.
DetailsList
;
}
}
}
})
}
},
closeForm
()
{
//关闭弹窗并刷新页面
this
.
$emit
(
"success"
);
},
//保存
saveTripPlan
()
{
this
.
apipost
(
'travel_post_SetTripCarPlan'
,
this
.
postMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
$emit
(
"success"
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
},
};
</
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