|
@@ -1,72 +1,36 @@
|
|
|
<template>
|
|
|
- <div class="VisitSchedule-all">
|
|
|
+ <div class="VisitSchedule-all" v-loading.fullscreen.lock="fullscreenLoading">
|
|
|
<div class="VisitSchedule-search-head">
|
|
|
<el-form ref="form" label-width="75px">
|
|
|
<el-form-item style="width: 340px;" label="团组名称:">
|
|
|
- <el-select filterable v-model="companyname" placeholder="请选择团组名称">
|
|
|
- <el-option v-for="(item,index) in companynamearr" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-select @change="ApprovalJourneyInit" filterable v-model="diid" placeholder="请选择团组名称">
|
|
|
+ <el-option v-for="(item,index) in groupList" :key="index" :label="item.teamName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div>
|
|
|
- <el-button size="small" type="primary">删除</el-button>
|
|
|
- <el-button size="small" type="primary">导入机票信息</el-button>
|
|
|
- <el-button size="small" type="primary">导出word</el-button>
|
|
|
+ <el-button size="small" @click="SaveApprovalJourney" type="primary">保存</el-button>
|
|
|
+ <el-button size="small" @click="DeleteApprovalJourney" type="primary">删除</el-button>
|
|
|
+ <el-button size="small" @click="CreateApprovalJourney" type="primary">导入机票信息</el-button>
|
|
|
+ <el-button size="small" @click="ExportApprovalJourneyWord" type="primary">导出word</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="VisitSchedule-content">
|
|
|
<div class="VisitSchedule-content-title">出访行程</div>
|
|
|
+ <div class="VisitSchedule-content-info">
|
|
|
+ 团组名:{{groupInfo.teamName}} 团组号:{{groupInfo.tourCode}} 出访日期:{{visitStartDate+'~'+visitEndDate}} {{groupInfo.visitDays+'天/'+groupInfo.visitPNumber+'人'}}
|
|
|
+ </div>
|
|
|
<div class="VisitSchedule-content-table">
|
|
|
- <div class="VisitSchedule-content-ul">
|
|
|
- <div class="content-ul-title">6月26日(星期三)第一天</div>
|
|
|
- <div class="VisitSchedule-content-li">
|
|
|
- <div class="VisitSchedule-content-time">
|
|
|
- <el-time-picker
|
|
|
- is-range
|
|
|
- v-model="value1"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- placeholder="选择时间范围">
|
|
|
- </el-time-picker>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-remark">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="2"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="textarea">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-li">
|
|
|
- <div class="VisitSchedule-content-time">
|
|
|
- <el-time-picker
|
|
|
- is-range
|
|
|
- v-model="value1"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- placeholder="选择时间范围">
|
|
|
- </el-time-picker>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-remark">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="2"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="textarea">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-ul">
|
|
|
- <div class="content-ul-title">6月26日(星期三)第一天</div>
|
|
|
- <div class="VisitSchedule-content-li">
|
|
|
+ <div v-for="(item,index) in tablearr" :key="index" class="VisitSchedule-content-ul">
|
|
|
+ <div class="content-ul-title">{{item.date}}</div>
|
|
|
+ <div v-for="(items,index) in item.chiList" :key="index" class="VisitSchedule-content-li">
|
|
|
<div class="VisitSchedule-content-time">
|
|
|
<el-time-picker
|
|
|
is-range
|
|
|
- v-model="value1"
|
|
|
+ format='HH:mm'
|
|
|
+ value-format='HH:mm'
|
|
|
+ v-model="items.timeInterval"
|
|
|
+ :default-value="value1"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始时间"
|
|
|
end-placeholder="结束时间"
|
|
@@ -75,30 +39,10 @@
|
|
|
</div>
|
|
|
<div class="VisitSchedule-content-remark">
|
|
|
<el-input
|
|
|
- type="textarea"
|
|
|
+ type="text"
|
|
|
:rows="2"
|
|
|
placeholder="请输入内容"
|
|
|
- v-model="textarea">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-li">
|
|
|
- <div class="VisitSchedule-content-time">
|
|
|
- <el-time-picker
|
|
|
- is-range
|
|
|
- v-model="value1"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- placeholder="选择时间范围">
|
|
|
- </el-time-picker>
|
|
|
- </div>
|
|
|
- <div class="VisitSchedule-content-remark">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="2"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="textarea">
|
|
|
+ v-model="items.details">
|
|
|
</el-input>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -111,11 +55,195 @@
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- companyname:'',
|
|
|
- companynamearr:[],
|
|
|
- value1: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
|
|
|
+ diid:'',
|
|
|
+ groupList:[],
|
|
|
+ tablearr:[],
|
|
|
+ userId:'',
|
|
|
+ value1: ['', ''],
|
|
|
textarea:'',
|
|
|
+ ss:[0,0],
|
|
|
+ groupInfo:{},
|
|
|
+ fullscreenLoading:false,
|
|
|
}
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ //报批行程初始化
|
|
|
+ ApprovalJourneyInit() {
|
|
|
+ this.groupInfo={};
|
|
|
+ this.tablearr=[];
|
|
|
+ this.fullscreenLoading=true;
|
|
|
+
|
|
|
+ var url = "/api/Groups/ApprovalJourneyInit"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ diid:that.diid==''?-1:that.diid,
|
|
|
+ userId:that.userId,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.groupList=res.data.data.groupList;
|
|
|
+ if(that.diid==''){
|
|
|
+ that.diid=that.groupList[0].id;
|
|
|
+ }
|
|
|
+ that.tablearr=res.data.data.content;
|
|
|
+ for(let i=0;i<that.tablearr.length;i++){
|
|
|
+ for(let a=0;a<that.tablearr[i].chiList.length;a++){
|
|
|
+ if(that.tablearr[i].chiList[a].timeInterval.length==1){
|
|
|
+ that.tablearr[i].chiList[a].timeInterval=that.value1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.groupInfo=res.data.data.groupInfo;
|
|
|
+ that.fullscreenLoading=false;
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ that.fullscreenLoading=false;
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('请联系信息部!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //报批行程保存
|
|
|
+ SaveApprovalJourney() {
|
|
|
+ var url = "/api/Groups/SaveApprovalJourney"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ userId:that.userId,
|
|
|
+ arr:that.tablearr
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.ApprovalJourneyInit();
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('请联系信息部!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //报批行程删除
|
|
|
+ DeleteApprovalJourney() {
|
|
|
+ var url = "/api/Groups/DeleteApprovalJourney"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ diid:that.diid,
|
|
|
+ userId:that.userId,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.ApprovalJourneyInit();
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('请联系信息部!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //报批行程导入机票信息
|
|
|
+ CreateApprovalJourney() {
|
|
|
+ var url = "/api/Groups/CreateApprovalJourney"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ diid:that.diid,
|
|
|
+ userid:that.userId
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.tablearr=res.data.data;
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('请联系信息部!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //报批行程导出
|
|
|
+ ExportApprovalJourneyWord() {
|
|
|
+ var url = "/api/Groups/ExportApprovalJourneyWord"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ diid:that.diid,
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: "导出成功!",
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ window.open(res.data.data)
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('请联系信息部!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
+ this.ApprovalJourneyInit();
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -130,7 +258,6 @@ export default {
|
|
|
.VisitSchedule-search-head{
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
}
|
|
|
.VisitSchedule-search-head .el-select{
|
|
|
width: 100%;
|
|
@@ -168,4 +295,10 @@ export default {
|
|
|
font-size: 17px;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
+.VisitSchedule-content-info{
|
|
|
+ text-align: center;
|
|
|
+ color: #555;
|
|
|
+ font-size:15px ;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
</style>
|