Commit 88a231ad authored by 沈良进's avatar 沈良进

save

parent ab2ee579
......@@ -1391,8 +1391,8 @@
>
</el-input>
</div> -->
</div
></template>
</div></template
>
</div>
<div class="_add_go _new_go">
<div>
......@@ -1601,6 +1601,9 @@
<el-form-item label="合作伙伴">
<el-select
remote
remote-method="onSearchFriend"
loading="loading"
multiple
v-model="friendValue"
filterable
......@@ -1620,16 +1623,36 @@
</el-form-item>
<el-form-item label="附件">
<td colspan="13">
<el-upload v-show="!ContractArray.length" class="upload-demo" style="display:inline-block;position:relative;top:-1px;left:3px;"
:http-request="uploadFileBtn" :show-file-list="false" action="">
<el-upload
v-show="!ContractArray.length"
class="upload-demo"
style="
display: inline-block;
position: relative;
top: -1px;
left: 3px;
"
:http-request="uploadFileBtn"
:show-file-list="false"
action=""
>
<el-button size="small" type="primary">添加附件</el-button>
</el-upload>
<template v-if="ContractArray&& ContractArray.length>0">
<template v-for="(subItem,subIndex) in ContractArray">
<a style="margin-left:20px;color:blue;cursor:pointer;" target="_blank" :key="subIndex"
@click="downloadFile(subItem.Url,subItem.Name)">{{subItem.Name}}</a>
<a :key="subIndex+1000" style="margin-left:20px;color:blue;cursor:pointer;"
@click="DeleteFile(subIndex)">删除</a>
<template v-if="ContractArray && ContractArray.length > 0">
<template v-for="(subItem, subIndex) in ContractArray">
<a
style="margin-left: 20px; color: blue; cursor: pointer"
target="_blank"
:key="subIndex"
@click="downloadFile(subItem.Url, subItem.Name)"
>{{ subItem.Name }}</a
>
<a
:key="subIndex + 1000"
style="margin-left: 20px; color: blue; cursor: pointer"
@click="DeleteFile(subIndex)"
>删除</a
>
</template>
</template>
</td>
......@@ -1655,61 +1678,83 @@ export default {
return {
ContractArray: [],
rules: {
GTeamName: [{
GTeamName: [
{
required: true,
message: "请输入业务名称",
trigger: "blur"
}],
StartDate: [{
trigger: "blur",
},
],
StartDate: [
{
required: true,
message: "请选择出发时间",
trigger: "blur"
}],
FSeat: [{
trigger: "blur",
},
],
FSeat: [
{
required: true,
message: "请输入头等舱价格",
trigger: "blur"
}],
CSeat: [{
trigger: "blur",
},
],
CSeat: [
{
required: true,
message: "请输入商务舱价格",
trigger: "blur"
}],
YSeat: [{
trigger: "blur",
},
],
YSeat: [
{
required: true,
message: "请输入经济舱价格",
trigger: "blur"
}],
MiddlePrice: [{
trigger: "blur",
},
],
MiddlePrice: [
{
required: true,
message: "请输入中心价格",
trigger: "blur"
}],
Remark: [{
trigger: "blur",
},
],
Remark: [
{
required: true,
message: "请输入备注",
trigger: "blur"
}],
C_StartAddress: [{
trigger: "blur",
},
],
C_StartAddress: [
{
required: true,
message: "请输入出发地点",
trigger: "change"
}],
C_ReturnAddress: [{
trigger: "change",
},
],
C_ReturnAddress: [
{
required: true,
message: "请输入返回地点",
trigger: "change"
}],
C_AdultNum: [{
trigger: "change",
},
],
C_AdultNum: [
{
required: true,
message: "请输入成人数",
trigger: "change"
}],
C_PayDate: [{
trigger: "change",
},
],
C_PayDate: [
{
required: true,
message: "请选择支付日期",
trigger: "change"
}]
trigger: "change",
},
],
},
detailInfo: {},
friendValue: [],
......@@ -1869,8 +1914,8 @@ export default {
mounted() {
this.initAirlines();
this.getList();
const {id} =this.$route.query
if(id) {
const { id } = this.$route.query;
if (id) {
this.getDetail(id);
}
},
......@@ -1879,20 +1924,21 @@ export default {
getDetail(id) {
this.apipost(
"post_GetTravelTeamInfo",
{GTeamId: id},
{ GTeamId: id },
(res) => {
if (res.data.resultCode == 1) {
this.detailInfo = res.data.data
this.editForm = res.data.data
const {TravelTeamFlightList,TravelTeamPartnerList} = res.data.data
TravelTeamFlightList.forEach(item => {
this.detailInfo = res.data.data;
this.editForm = res.data.data;
const { TravelTeamFlightList, TravelTeamPartnerList } =
res.data.data;
TravelTeamFlightList.forEach((item) => {
item.IsTransfer = item.IsTransfer || 0;
item.TicketType = Math.random() > 0.5 ? 1 : 2;
})
this.addMsg.flightList = TravelTeamFlightList
this.friendValue = TravelTeamPartnerList
});
this.addMsg.flightList = TravelTeamFlightList;
this.friendValue = TravelTeamPartnerList;
// this.
console.log('this.addMsg.flightList',this.addMsg.flightList)
console.log("this.addMsg.flightList", this.addMsg.flightList);
} else {
this.$message.error(res.data.message);
}
......@@ -1900,15 +1946,20 @@ export default {
(err) => {}
);
},
onSearchFriend() {
this.getList()
},
// 获取合作伙伴列表
getList() {
if (this.departState) {
this.msg.allDepartment = 1;
}
this.loading = true
this.apipost(
"app_customer_GetCustomerListForCareOf",
this.msg,
(res) => {
this.loading = false
if (res.data.resultCode == 1) {
this.customerListAll = [];
res.data.data.pages.pageData.forEach((item) => {
......@@ -2035,7 +2086,7 @@ export default {
},
submit() {
//提交创建、修改表单
this.$refs.form.validate(valid => {
this.$refs.form.validate((valid) => {
if (valid) {
this.addAward();
} else {
......@@ -2045,47 +2096,51 @@ export default {
},
addAward() {
this.editForm.TravelTeamFlightList = this.addMsg.flightList;
console.log('TravelTeamFlightList', this.editForm.TravelTeamFlightList, this.ContractArray)
this.editForm.TravelTeamPartnerList = this.friendValue.map(item => {
return {CustomerId:item}
})
if(!this.editForm.TravelTeamPartnerList.length) {
this.Warning('请选择合作伙伴')
return
console.log(
"TravelTeamFlightList",
this.editForm.TravelTeamFlightList,
this.ContractArray
);
this.editForm.TravelTeamPartnerList = this.friendValue.map((item) => {
return { CustomerId: item };
});
if (!this.editForm.TravelTeamPartnerList.length) {
this.Warning("请选择合作伙伴");
return;
}
if(this.editForm.TravelTeamFlightList.findIndex(item => item.TicketType === 1) === -1) {
this.Warning('请选择去程航班')
return
if (
this.editForm.TravelTeamFlightList.findIndex(
(item) => item.TicketType === 1
) === -1
) {
this.Warning("请选择去程航班");
return;
}
if(this.editForm.TravelTeamFlightList.findIndex(item => item.TicketType === 2) === -1) {
this.Warning('请选择回程航班')
return
if (
this.editForm.TravelTeamFlightList.findIndex(
(item) => item.TicketType === 2
) === -1
) {
this.Warning("请选择回程航班");
return;
}
if(this.ContractArray.length) {
this.editForm.WordUrl = this.ContractArray[0].Url
if (this.ContractArray.length) {
this.editForm.WordUrl = this.ContractArray[0].Url;
}
console.log("</template>", this.editForm, this.addMsg, this.friendValue, this.ContractArray);
console.log(
"</template>",
this.editForm,
this.addMsg,
this.friendValue,
this.ContractArray
);
this.apipost(
"post_SetTeavelTeam",
this.editForm,
(res) => {
if (res.data.resultCode == 1) {
this.customerListAll = [];
res.data.data.pages.pageData.forEach((item) => {
this.customerListAll.push(item.CustomerId);
item.CustomerIdS = item.CustomerId;
item.CustomerId =
item.CustomerId +
"|" +
item.EmployeeId +
"|" +
item.RB_Department_Id;
item["disabled"] = false;
item.Address = item.Address.split(",").join("");
});
this.datainfo = res.data.data;
this.list = res.data.data.pages.pageData;
this.total = res.data.data.pages.count;
this.Success("添加成功");
this.$route.replace("/TravelTeam");
} else {
this.$message.error(res.data.message);
}
......@@ -2114,24 +2169,25 @@ export default {
},
//下载文件
downloadFile(fileUrl, fileName) {
const link = document.createElement('a');
const link = document.createElement("a");
link.href = fileUrl;
link.download = fileName;
document.body.appendChild(link);
link.click();
},
uploadFileBtn(file) { //上传
uploadFileBtn(file) {
//上传
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.$message.info(this.$t("tips.shangchuanzhong"));
this.UploadSelfFileT(path, newArr, (x) => {
var newUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.ContractArray.push({
Name: x.data.SourceFileName,
Url: newUrl
Url: newUrl,
});
this.Success(this.$t('tips.scchenggong'))
this.Success(this.$t("tips.scchenggong"));
});
},
},
......
<style scoped>
.wrapper {
width: 600px;
background: #fff;
margin: 0 auto;
padding: 20px;
<style scoped>
@import "../../../assets/css/newTravelManager.css";
.w_20 {
width: 20%;
}
.mb {
margin-bottom: 10px;
}
.title {
font-weight: 600;
}
.p20 {
padding: 20px;
}
</style>
<template>
<div class="wrapper">
<el-table v-if="dataList.length>0" :data="dataList" style="width:100%" border v-loading='loading'
:height="tableHeight">
<el-table-column fixed label="ホテル名" min-width="180">
<template slot-scope="scope">
<div>
{{scope.row.HotelName}}</div>
<div>{{scope.row.TotalInventory}}</div>
<div class="TC_Content">
<div class="TC-MyList">
<div class="query-box">
<ul>
<!-- <li>
<span>
<em>{{$t('system.table_ssLine')}}</em>
<el-select class="w150" v-model="queryMsg.LineId" filterable :placeholder="$t('pub.pleaseSel')"
@change="resetQuery">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in queryDataObj.LineList" :label="item.LineName" :value="item.LineID"
:key="item.LineID"></el-option>
</el-select>
</span>
</li> -->
<li>
<span>
<em>业务名称</em>
<el-input maxlength="50" v-model="queryMsg.GTeamName" class="permiss-input w150"
@keyup.native.enter="resetQuery" :placeholder="$t('pub.pleaseImport')"></el-input>
</span>
</li>
<li>
<span>
<em>{{$t('scen.sc_ftTime')}}</em>
<el-date-picker class="w150" type="date" v-model="queryMsg.SelectStartDate"
:picker-options="pickerBeginDateBefore" value-format="yyyy-MM-dd" placeholder></el-date-picker>
<el-date-picker class="w150" type="date" v-model="queryMsg.SelectEndDate"
:picker-options="pickerBeginDateAfter" value-format="yyyy-MM-dd" placeholder></el-date-picker>
</span>
</li>
<li>
<button class="hollowFixedBtn" @click="addAirplane">新增</button>
<button class="hollowFixedBtn" @click="resetQuery">{{$t('pub.searchBtn')}}</button>
</li>
</ul>
</div>
<div class="TravelTclList" v-loading="queryMsg.loading">
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="queryMsg.pageSize" :total="queryMsg.total">
</el-pagination>
<ul>
<li v-for="(item,index) in queryDataObj.dataList" :key="index"
:class="{'TC_hasContent':item.OPInnerRemark==''&&item.OPRemark==''}">
<div class="TC_remarkContent">
<div class="el-col w_20">
<div class="p20">
<div class="mb title"><i class="iconfont icon-biaoti1"></i><span>包机信息</span></div>
<div class="mb"><span>{{item.GTeamName}}</span></div>
<div>出发日期:<span>{{item.StartDate}}</span></div>
</div>
</div>
<div class="el-col w_20">
<div class="p20">
<div class="mb title"><i class="iconfont icon-hangban1"></i><span>航班信息</span></div>
<div class="mb" v-for="(subItem,subIndex) in item.TravelTeamFlightList" :key="subIndex+1000">
<div> {{subItem.Flight_number}}
{{subItem.DepartureAirPortName}} {{subItem.Departure_time}} {{subItem.ArrivalAirPortName}}
{{subItem.Arrival_time}}</div>
</div></div>
</div>
<div class="el-col w_20">
<div class="p20">
<div class="mb title"><i class="iconfont icon-jiage"></i><span>航班价格</span></div>
<div class="mb"><span>经济舱: {{item.YSeat}}</span></div>
<div class="mb"><span>商务舱: {{item.CSeat}}</span></div>
<div class="mb"><span>头等舱: {{item.FSeat}}</span></div>
<div><span>中心价: {{item.MiddlePrice}}</span></div>
</div>
</div>
<div class="el-col w_20">
<div class="p20">
<div class="mb title"><i class="iconfont icon-tuandui"></i><span>合作伙伴</span></div>
<template v-for="(subItem,subIndex) in item.TravelTeamPartnerList">
<el-tag :key="subIndex+1000" style="margin-right:10px;">{{subItem.CustomerName}}</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="el-col w_20">
<div class="p20">
<div class="mb title"><i class="iconfont icon-yuangong"></i><span>发起信息</span></div>
<div class="mb">发起人:{{item.CreateByName}}</div>
<div>发起时间:{{item.CreateTime}}</div></div>
</div>
<div class="el-col w_20">
<div class="p20">
<!-- <span>操作</span> -->
<el-button class="mb" @click.native='goUrl("airplaneInfo", item.GTeamId,"包机信息")' type="primary" size="mini"
style="background:#00C6FF; border-color:#00C6FF">修改
</el-button>
<el-dropdown trigger="click">
<span class="el-dropdown-link">更多
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown" class="travelControlDropDown">
<el-dropdown-item>
财务入账
</el-dropdown-item>
<el-dropdown-item>
财务审核
</el-dropdown-item>
<el-dropdown-item>
包机结算
</el-dropdown-item>
<el-dropdown-item>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
<div class="TC_remarkContent">
<div class="p20">备注: {{item.Remark}}</div>
</div>
</li>
</ul>
<div class="noData" v-show="queryMsg.noData">{{$t('system.content_noData')}}</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="queryMsg.pageSize" :total="queryMsg.total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
const baseInfo = {
start: '',
end: '',
max: ''
}
export default {
export default {
provide() {
return {
reload: this.reload
}
},
data() {
return {
editForm: {},
baseList: [this.createBaseInfo()]
//查询参数
queryMsg: {
pageIndex: 1,
pageSize: 10,
total: 0,
//是否有数据
noData: false,
currentPage: 1,
loading: false, //加载层
GTeamName: "", //业务名称
SelectStartDate: "", //开始时间
SelectEndDate: "", //结束时间
},
queryDataObj: {
LineList: [], //线路列表
AirlineList: [], //航空公司列表
dataList: [], //数据列表
},
//当前登录用户信息
CurrentUserInfo: {},
IsModifyTravelControl: 0, //分公司是否有修改团控权限
pickerBeginDateBefore: {
disabledDate: time => {
if (this.queryMsg.SelectEndDate == null) {
return false;
} else {
let endTime = new Date(this.queryMsg.SelectEndDate);
return endTime.getTime() < time.getTime();
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.queryMsg.SelectStartDate);
return startTime.getTime() >= time.getTime();
}
},
};
},
components: {
},
//监听器
watch: {
// 方法1
'$route'(to, from) { //监听路由是否变化
location.reload()
},
},
methods: {
handleAddOrDelete(index) {
if(index) {
this.baseList.splice(index, 1)
} else {
this.baseList.push(this.createBaseInfo())
goUrl(path,id, name) {
this.$router.push({
name: path,
query: {
id: id,
blank: "y",
tab: name
}
});
},
addAirplane() {
this.$router.push({
name: 'airplaneInfo',
});
},
//翻页
handleCurrentChange(val) {
this.queryMsg.pageIndex = val;
this.getTravelTeamList();
},
//获取线路列表
getLineList() {
this.apipost(
"line_post_GetList", {
LineDirection: 2
},
createBaseInfo() {
return JSON.parse(JSON.stringify(baseInfo))
res => {
if (res.data.resultCode == 1) {
this.queryDataObj.LineList = res.data.data;
}
}
};
);
},
//获取航空公司
getAirlineList() {
this.apipost(
"airline_post_GetList", {},
res => {
if (res.data.resultCode == 1) {
this.queryDataObj.AirlineList = res.data.data;
}
}
);
},
//重新查询
resetQuery() {
this.queryMsg.pageIndex = 1;
this.getTravelTeamList();
},
//获取包机列表
getTravelTeamList() {
this.queryMsg.loading = true;
this.apipost(
"travelteam_GetTeavelTeamPage",
this.queryMsg,
res => {
this.queryMsg.loading = false;
if (res.data.resultCode == 1) {
this.queryDataObj.dataList = res.data.data.pageData;
this.queryMsg.total = res.data.data.count;
}
}
);
},
},
mounted() {
this.getTravelTeamList();
},
created() {
this.CurrentUserInfo = this.getLocalStorage();
this.getLineList();
}
};
</script>
......@@ -2319,6 +2319,13 @@ export default {
meta: {
title: '在线申请'
},
}, {
path: '/airplaneOrder', //订单列表
name: 'airplaneOrder',
component: resolve => require(['@/components/TravelManager/TravelTeam/orderInfo'], resolve),
meta: {
title: '订单列表'
},
}, {
path: '/TravelSupplier', //供应商列表
name: 'TravelSupplier',
......
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