Commit 0fd5c53a authored by 华国豪's avatar 华国豪 🙄

导入旅客名单

parent ecf3eda3
......@@ -940,28 +940,23 @@
cursor: pointer;
width: 60px;
}
.RegistrationList .leftSetInfo,
.RegistrationList .GO_TPright {
float: left;
.RegistrationList .leftSetInfo,.RegistrationList .GO_TPright{
float:left;
}
.RegistrationList .GO_Title {
.RegistrationList .GO_Title{
display: inline-block;
margin-top: 10px;
padding-right: 10px;
font-size: 12px;
padding-right:10px;
font-size:12px;
width: 90px;
text-align: right;
}
._TravelPricePopover .GOScenicDiv {
._TravelPricePopover .GOScenicDiv{
width: 500px;
max-height: 400px;
overflow: auto;
}
._TravelPricePopover table {
._TravelPricePopover table{
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
......@@ -971,13 +966,13 @@
width: 100%;
}
._TravelPricePopover table ._color_666 {
._TravelPricePopover table ._color_666{
background-color: #ededed;
color: #666666;
padding: 5px;
}
._TravelPricePopover table td {
._TravelPricePopover table td{
background-color: #ffffff;
padding: 9px 0;
color: #333333;
......@@ -988,7 +983,6 @@
._TravelPricePopover table td._d_name {
background-color: #ededed;
}
.RegistrationList .SimulateDrop-box {
width: 230px;
min-height: 34px;
......@@ -997,15 +991,13 @@
float: left;
margin-top: 4px;
border: 1px solid #d1d1d1;
}
.RegistrationList .GO_SimulaDrop {
}
.RegistrationList .GO_SimulaDrop{
position: absolute;
right: 10px;
top: 5px;
color: #d1d1d1;
right:10px;
top:5px;
color:#d1d1d1;
}
.RegistrationList .SD_flight {
display: inline-block;
height: 24px;
......@@ -1014,12 +1006,12 @@
max-width: 200px;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 12px;
font-size:12px;
padding: 0 8px;
line-height: 22px;
background-color: #f0f2f5;
}
.RegistrationList .importNameFile.el-dialog--center .el-dialog__body{text-align: center;}
</style>
<template>
......@@ -2183,6 +2175,7 @@
<div @click="SetShouSunClick(childItem.OrderId, childItem.GuestNum)">设置收损金额</div>
<div @click="lianyunFY(childItem)">联运返佣</div>
<div @click="ZhuiJiaTuanKuan(childItem.OrderId)" v-if="RBBranchId == 0">追加团款</div>
<div @click="importNameOrder(childItem.OrderId)" v-if="OrderDataList.OtherOrderList.length == 1 && subItem.List.length == 1">导入旅客名单</div>
<div v-if="childItem.OrderState=='1'||childItem.OrderState=='2'||childItem.OrderState=='3'"
@click='deleteItem(childItem)'>
删除
......@@ -2553,6 +2546,7 @@
设置额外金额</div>
<div @click="SetShouSunClick(item.OrderId, item.GuestNum)">设置收损金额</div>
<div @click="ZhuiJiaTuanKuan(item.OrderId)" v-if="RBBranchId == 0">追加团款</div>
<div @click="importNameOrder(item.OrderId)">导入旅客名单</div>
<div v-if="item.OrderState=='2'||item.OrderState=='3'" @click='deleteItem(item)'>删除</div>
</div>
<el-button slot="reference" type="primary"
......@@ -2691,7 +2685,7 @@
{{LeaderInfoList.LeaderGuide.Surname}}{{LeaderInfoList.LeaderGuide.Name}}
</td>
<td>
{{leaderItem.HolidayStr}}
请假
</td>
<td>
{{leaderItem.StartDateStr2}}{{leaderItem.EndDateStr2}}
......@@ -2984,6 +2978,14 @@
</div>
</el-dialog>
<a id='RegistrationList_DownLoad' target="_blank" style="display:none">1不要删除</a>
<el-dialog custom-class='w700 importNameFile' title="导入旅客名单" :visible.sync="importNameFile" center>
<el-upload drag class="upload-demo" :action="importFileUrl2" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
</el-upload>
</el-dialog>
</div>
</template>
......@@ -2994,6 +2996,8 @@
export default {
data() {
return {
importFileUrl2: '',
importNameFile: false,
HightUnitPrice: "0",
redBagList: [],
IsHaveAuth: 0, //是否有权限
......@@ -3409,6 +3413,35 @@
commonShouSun: commonShouSun
},
methods: {
//上传
handleAvatarSuccess(res, file) {
if (res.resultCode == 1) {
this.Success(res.message);
this.outerVisible = false;
this.isShow = false;
this.fillShow = true;
this.importData = res.data;
this.getList()
} else{
this.$message.error(res.message);
}
},
// 上传验证
beforeAvatarUpload(file) {
return
const isJPG = file.type === "application/x-msdownload";
if (!isJPG) {
this.$message.error("上传文件只能是 excel 格式!");
}
return isJPG && isLt2M;
},
// 导入名单
importNameOrder(id){
let uerInfo = this.getLocalStorage();
this.importFileUrl2 = this.domainManager().UploadFileUrl +
"?cmd=dmc_post_LocalFileUpload&fileType=1&fileLimit=1&RB_Group_id=2&Type=6&OrderId=" + id + "&EmployeeId=" + uerInfo.EmployeeId;
this.importNameFile = true;
},
// OP备注赋值
OPRemark(item) {
this.apipost('sellorder_post_GetOrderEntity', {
......@@ -5069,44 +5102,8 @@
err => {}
);
},
getStartOrEndDate(start1, end1, start2, end2) {
var startdate1 = new Date(start1.replace("-", "/").replace("-", "/"));
var enddate1 = new Date(end1.replace("-", "/").replace("-", "/"));
var startdate2 = new Date(start2.replace("-", "/").replace("-", "/"));
var enddate2 = new Date(end2.replace("-", "/").replace("-", "/"));
//startdate1介于另一个区间之间
if (startdate1 >= startdate2 && startdate1 <= enddate2) {
return true;
}
//enddate1介于另一个区间之间
if (enddate1 >= startdate2 && enddate1 <= enddate2) {
return true;
}
//startdate1-enddate1的区间大于另一个区间,且另一个区间在startdate1-enddate1之间
if (startdate1 <= startdate1 && enddate1 >= enddate2) {
return true;
}
return false;
},
//确定设置领队
setTheLeader() {
let isCked = false;
this.LeaderHolidyList.forEach(x => {
if (!isCked && this.getStartOrEndDate(this.ConfigData.Config.StartDate, this.ConfigData.Config.EndDate, x.StartDateStr2,x.EndDateStr2)) {
isCked = true;
}
})
if (isCked) {
var that = this;
that.Confirm("该领队在请假期,是否继续?", function () {
that.getLeader();
})
} else {
this.getLeader();
}
},
getLeader() {
if (this.isSubmit) {
this.isSubmit = false;
this.apipost(
......
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