Commit 10037f3a authored by 黄奎's avatar 黄奎

页面修改

parent 085e4cfc
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
.tripPlanTab tr th { .tripPlanTab tr th {
min-width: 55px; min-width: 55px;
height: 40px; height: 29px;
line-height: 40px;
} }
.tripPlanTab tr td { .tripPlanTab tr td {
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li><span><em>{{$t('pub.date')}}</em> <li><span><em>{{$t('pub.date')}}</em>
<el-date-picker v-model="msg.MonthStr" type="month" placeholder="选择月" format="yyyy-MM" <el-date-picker v-model="msg.MonthStr" type="month" placeholder="选择月" format="yyyy-MM" @change="getList()"
value-format="yyyy-MM"> value-format="yyyy-MM">
</el-date-picker> </el-date-picker>
</span> </span>
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; min-hei" <div style="width:100%;overflow-x:auto;padding-bottom:10px;margin-top:10px;min-height:100px;"
class="ownScrollbarStyle" v-loading="loading"> class="ownScrollbarStyle" v-loading="loading">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0"> <table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead> <thead>
...@@ -52,8 +51,7 @@ ...@@ -52,8 +51,7 @@
<template v-for="(hItem,hIndex) in headerList"> <template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex"> <th :key="`h_`+hIndex">
{{hItem.DayStr}} {{hItem.DayStr}}
<br /> <span style="display: block;">{{hItem.WeekStr}}</span>
{{hItem.WeekStr}}
</th> </th>
</template> </template>
</template> </template>
...@@ -62,7 +60,7 @@ ...@@ -62,7 +60,7 @@
<tbody v-for="(item,index) in dataList" :key="`d_`+index"> <tbody v-for="(item,index) in dataList" :key="`d_`+index">
<tr> <tr>
<td rowspan="2"> <td rowspan="2">
{{item.CarName}}<br /> {{item.CarName}}({{item.CarSeatNum}}座)<br />
{{item.CarNo}} {{item.CarNo}}
</td> </td>
<template v-for="(subItem,subIndex) in item.SubList"> <template v-for="(subItem,subIndex) in item.SubList">
...@@ -88,7 +86,9 @@ ...@@ -88,7 +86,9 @@
<template v-for="(subItem,subIndex) in item.SubList"> <template v-for="(subItem,subIndex) in item.SubList">
<template v-if="subItem.DayObj"> <template v-if="subItem.DayObj">
<td v-if="subItem.DayObj.DayNum==1" :colspan="subItem.DayObj.ColumnNum"> <td v-if="subItem.DayObj.DayNum==1" :colspan="subItem.DayObj.ColumnNum">
{{subItem.DayObj.DMCNum}} {{subItem.DayObj.InOut}} <font @click="editPlan(subItem.DayObj)" style="color:blue;cursor:pointer;"> {{subItem.DayObj.DMCNum}}
{{subItem.DayObj.InOutStr}}</font>
<i class="el-icon-delete" @click="deleteTrip(subItem.DayObj)" style="color:red;"></i>
</td> </td>
</template> </template>
<template v-else> <template v-else>
...@@ -130,6 +130,28 @@ ...@@ -130,6 +130,28 @@
editTripPlan editTripPlan
}, },
methods: { methods: {
//删除用车
deleteTrip(item) {
var that = this;
this.Confirm(that.$t('tips.shifoushanchu'), function () {
var delMsg = {
PlanId: item.PlanId
};
that.apipost(
"travel_post_DeleteTripCar",
delMsg,
res => {
if (res.data.resultCode == 1) {
that.Success(that.$t('tips.shanchuchenggong'));
that.getList();
} else {
that.Error(res.data.data);
}
},
null
);
});
},
//新增团队行程用车 //新增团队行程用车
editPlan(item) { editPlan(item) {
this.editMsg.MonthStr = this.msg.MonthStr; this.editMsg.MonthStr = this.msg.MonthStr;
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="进出点"> <el-form-item label="进出点">
<el-input v-model="postMsg.InOut"></el-input> <el-input v-model="postMsg.InOutStr"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -101,6 +101,11 @@ ...@@ -101,6 +101,11 @@
{{$t('pub.saveBtn')}} {{$t('pub.saveBtn')}}
</el-button> </el-button>
</el-row> </el-row>
<el-row>
<el-col :span="24">
&nbsp;
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -119,7 +124,7 @@ ...@@ -119,7 +124,7 @@
EndDate: "", //用车结束时间 EndDate: "", //用车结束时间
Remark: "", //备注 Remark: "", //备注
CarId: 0, //车Id, CarId: 0, //车Id,
InOut: "", //进出点 InOutStr: "", //进出点
DetailsList: [] DetailsList: []
}, },
priceList: [], //价格列表 priceList: [], //价格列表
...@@ -133,14 +138,20 @@ ...@@ -133,14 +138,20 @@
this.getCarList(); this.getCarList();
}, },
mounted() { mounted() {
if (this.editMsg && this.editMsg.MonthStr) { if (this.editMsg) {
this.getPriceList(); if (this.editMsg.MonthStr) {
this.getPriceList();
}
if (this.editMsg.Q_PlanId) {
this.getPlanInfo();
}
} }
}, },
watch: { watch: {
editMsg: { editMsg: {
handler(val, oldVal) { handler(val, oldVal) {
this.getPriceList(); this.getPriceList();
this.getPlanInfo();
}, },
}, },
}, },
...@@ -159,7 +170,6 @@ ...@@ -159,7 +170,6 @@
MonthStr: this.editMsg.MonthStr MonthStr: this.editMsg.MonthStr
} }
this.apipost('travel_post_GetTravelPriceListByMonth', pMsg, res => { this.apipost('travel_post_GetTravelPriceListByMonth', pMsg, res => {
console.log("travel_post_GetTravelPriceListByMonth", res)
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.priceList = res.data.data; this.priceList = res.data.data;
} else { } else {
...@@ -167,6 +177,33 @@ ...@@ -167,6 +177,33 @@
} }
}) })
}, },
//获取计划详情
getPlanInfo() {
var pMsg = {
PlanId: this.editMsg.Q_PlanId
};
this.apipost('travel_post_GetTripCarPlan', pMsg, res => {
console.log("travel_post_GetTripCarPlan", res);
if (res.data.resultCode == 1) {
var tempData = res.data.data;
if (tempData) {
this.postMsg.PlanId = tempData.PlanId;
this.postMsg.TCID = tempData.TCID;
this.postMsg.PlanType = tempData.PlanType;
this.postMsg.Remark = tempData.Remark;
this.postMsg.CarId = tempData.CarId;
this.postMsg.StartDate = tempData.StartDate;
this.postMsg.EndDate = tempData.EndDate;
this.postMsg.InOutStr = tempData.InOutStr;
if (tempData.DetailsList && tempData.DetailsList.length > 0) {
this.postMsg.DetailsList = tempData.DetailsList;
}
}
} else {
this.Error(res.data.message);
}
})
},
getDetailsObj() { getDetailsObj() {
var dObj = { var dObj = {
DetailId: 0, //详情Id DetailId: 0, //详情Id
...@@ -189,7 +226,7 @@ ...@@ -189,7 +226,7 @@
if (tempData) { if (tempData) {
this.postMsg.StartDate = tempData.StartDate; this.postMsg.StartDate = tempData.StartDate;
this.postMsg.EndDate = tempData.EndDate; this.postMsg.EndDate = tempData.EndDate;
this.postMsg.InOut = tempData.InOut; this.postMsg.InOutStr = tempData.InOutStr;
if (tempData.DetailsList && tempData.DetailsList.length > 0) { if (tempData.DetailsList && tempData.DetailsList.length > 0) {
this.postMsg.DetailsList = tempData.DetailsList; this.postMsg.DetailsList = tempData.DetailsList;
} }
...@@ -204,7 +241,9 @@ ...@@ -204,7 +241,9 @@
}, },
//保存 //保存
saveTripPlan() { saveTripPlan() {
this.saveLoading = true;
this.apipost('travel_post_SetTripCarPlan', this.postMsg, res => { this.apipost('travel_post_SetTripCarPlan', this.postMsg, res => {
this.saveLoading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.$emit("success"); this.$emit("success");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment