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

页面修改

parent 085e4cfc
......@@ -13,8 +13,7 @@
.tripPlanTab tr th {
min-width: 55px;
height: 40px;
line-height: 40px;
height: 29px;
}
.tripPlanTab tr td {
......@@ -29,7 +28,7 @@
<div class="query-box" style="border-bottom: none;">
<ul>
<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">
</el-date-picker>
</span>
......@@ -40,7 +39,7 @@
</li>
</ul>
</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">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead>
......@@ -52,8 +51,7 @@
<template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex">
{{hItem.DayStr}}
<br />
{{hItem.WeekStr}}
<span style="display: block;">{{hItem.WeekStr}}</span>
</th>
</template>
</template>
......@@ -62,7 +60,7 @@
<tbody v-for="(item,index) in dataList" :key="`d_`+index">
<tr>
<td rowspan="2">
{{item.CarName}}<br />
{{item.CarName}}({{item.CarSeatNum}}座)<br />
{{item.CarNo}}
</td>
<template v-for="(subItem,subIndex) in item.SubList">
......@@ -88,7 +86,9 @@
<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}}
<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>
</template>
<template v-else>
......@@ -130,6 +130,28 @@
editTripPlan
},
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) {
this.editMsg.MonthStr = this.msg.MonthStr;
......
......@@ -49,7 +49,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="进出点">
<el-input v-model="postMsg.InOut"></el-input>
<el-input v-model="postMsg.InOutStr"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -101,6 +101,11 @@
{{$t('pub.saveBtn')}}
</el-button>
</el-row>
<el-row>
<el-col :span="24">
&nbsp;
</el-col>
</el-row>
</el-form>
</div>
</template>
......@@ -119,7 +124,7 @@
EndDate: "", //用车结束时间
Remark: "", //备注
CarId: 0, //车Id,
InOut: "", //进出点
InOutStr: "", //进出点
DetailsList: []
},
priceList: [], //价格列表
......@@ -133,14 +138,20 @@
this.getCarList();
},
mounted() {
if (this.editMsg && this.editMsg.MonthStr) {
if (this.editMsg) {
if (this.editMsg.MonthStr) {
this.getPriceList();
}
if (this.editMsg.Q_PlanId) {
this.getPlanInfo();
}
}
},
watch: {
editMsg: {
handler(val, oldVal) {
this.getPriceList();
this.getPlanInfo();
},
},
},
......@@ -159,7 +170,6 @@
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 {
......@@ -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() {
var dObj = {
DetailId: 0, //详情Id
......@@ -189,7 +226,7 @@
if (tempData) {
this.postMsg.StartDate = tempData.StartDate;
this.postMsg.EndDate = tempData.EndDate;
this.postMsg.InOut = tempData.InOut;
this.postMsg.InOutStr = tempData.InOutStr;
if (tempData.DetailsList && tempData.DetailsList.length > 0) {
this.postMsg.DetailsList = tempData.DetailsList;
}
......@@ -204,7 +241,9 @@
},
//保存
saveTripPlan() {
this.saveLoading = true;
this.apipost('travel_post_SetTripCarPlan', this.postMsg, res => {
this.saveLoading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
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