Commit f6ab8a15 authored by zhengke's avatar zhengke

修改合同

parent f072a3dc
...@@ -736,9 +736,9 @@ ...@@ -736,9 +736,9 @@
} }
.GO_Contract{ .GO_Contract{
color:blue; color:blue;
display: block; display: inline-block;
cursor: pointer; cursor: pointer;
max-width: 200px; margin-right:20px;
} }
.needfenshu{ .needfenshu{
margin-top: 10px; margin-top: 10px;
...@@ -1846,8 +1846,14 @@ ...@@ -1846,8 +1846,14 @@
</span> </span>
</div> </div>
<span v-if="item.contractNum==''" class="GO_Contract" @click="goContract(item)" >领取合同</span> <div v-if="item.ContractNum.length==0">
<span v-else class="GO_Contract" @click="goContract(item)">{{item.contractNum}}</span> <span class="GO_Contract" @click="goContract(item,{})">领取合同</span>
</div>
<div v-else>
<span v-for="sItem in childItem.ContractNum" class="GO_Contract" @click="goContract(item,sItem)">
{{sItem.Client_Name+''+sItem.ContractNum}}
</span>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -2394,11 +2400,12 @@ ...@@ -2394,11 +2400,12 @@
}); });
}, },
//跳转至领取合同 //跳转至领取合同
goContract(item){ goContract(item,sItem){
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
name: 'TravelContractNew', name: 'TravelContractNew',
query: { query: {
TCID: item.tcid, TCID: item.tcid,
guestId:sItem.GuestId,
orderID:item.orderId, orderID:item.orderId,
blank: 'y' blank: 'y'
} }
......
...@@ -858,7 +858,8 @@ ...@@ -858,7 +858,8 @@
//查询参数 //查询参数
msg: { msg: {
TCID: 0, TCID: 0,
orderID: 0 orderID: 0,
guestId:0
}, },
//数据源 //数据源
dataList: [], dataList: [],
...@@ -1411,6 +1412,7 @@ ...@@ -1411,6 +1412,7 @@
mounted() { mounted() {
this.msg.TCID = this.$route.query.TCID; this.msg.TCID = this.$route.query.TCID;
this.msg.orderID = this.$route.query.orderID; this.msg.orderID = this.$route.query.orderID;
this.msg.guestId = this.$route.query.guestId;
this.getList(); this.getList();
this.GetTrip(0,this.msg.TCID); this.GetTrip(0,this.msg.TCID);
} }
......
...@@ -121,6 +121,10 @@ ...@@ -121,6 +121,10 @@
.TC-MainContent .w150{ .TC-MainContent .w150{
width:150px!important; width:150px!important;
} }
.TC-MainContent .w600{
width:600px!important;
}
.TC-MainContent .singeRowTable{width: 100%;border-collapse:collapse;} .TC-MainContent .singeRowTable{width: 100%;border-collapse:collapse;}
.TC-MainContent .singeRowTable tr th,.v-table-title-cell{background: #E6E6E6;height:40px; font-size: 14px; color: #333;} .TC-MainContent .singeRowTable tr th,.v-table-title-cell{background: #E6E6E6;height:40px; font-size: 14px; color: #333;}
.TC-MainContent .singeRowTable tr{background: #fff;text-align: center; height: 40px;} .TC-MainContent .singeRowTable tr{background: #fff;text-align: center; height: 40px;}
...@@ -216,14 +220,6 @@ ...@@ -216,14 +220,6 @@
<div class="TC-MainContent"> <div class="TC-MainContent">
<!-- 内容开始 --> <!-- 内容开始 -->
<ul class="fixedMenu" id="fixedMenu"> <ul class="fixedMenu" id="fixedMenu">
<!-- <li class="">合同基本信息</li>
<li class="active">合同协议条款</li>
<li class="">其他约定事项</li>
<li class="">投诉联系</li>
<li class="">行程信息</li>
<li>游客信息</li>
<li>自愿购物活动补充协议</li>
<li class="">自愿付费项目补充协议</li> -->
<li v-for="(item,index) in menuArr" :class="{'active':index==ckedIndex}" @click="ckedIndex=index,goAnchor('#anchor-'+index)">{{item}}</li> <li v-for="(item,index) in menuArr" :class="{'active':index==ckedIndex}" @click="ckedIndex=index,goAnchor('#anchor-'+index)">{{item}}</li>
</ul> </ul>
<div class="contractTit"> <div class="contractTit">
...@@ -235,7 +231,9 @@ ...@@ -235,7 +231,9 @@
<input type="button" v-if="CtObj.status==1&&CtObj.auditContract==0" class="TCbtn-info" @click="sendAudit()" value="提交审核"/> <input type="button" v-if="CtObj.status==1&&CtObj.auditContract==0" class="TCbtn-info" @click="sendAudit()" value="提交审核"/>
<input type="button" v-if="CtObj.status==1&&CtObj.auditContract==3" class="TCbtn-info" @click="sendAudit()" value="审核已被驳回,重新提交"/> <input type="button" v-if="CtObj.status==1&&CtObj.auditContract==3" class="TCbtn-info" @click="sendAudit()" value="审核已被驳回,重新提交"/>
<input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="goUrl()" value="预览"> <input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="goUrl()" value="预览">
<input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="getinvalid()" value="作废"> <input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="getinvalid()" value="作废" style="display:none;">
<input type="button" v-if="!msg.guestId" class="TCbtn-info" @click="dialogVisible=true,getGuestList()" value="复制合同"/>
<input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="msgDialog=true,getMsgList()" value="发送短信"/>
<input type="button" v-if="CtObj.auditContract==0||CtObj.auditContract==3" class="btn-warning" @click="submitForm('CtObj')" value="保存"/> <input type="button" v-if="CtObj.auditContract==0||CtObj.auditContract==3" class="btn-warning" @click="submitForm('CtObj')" value="保存"/>
</div> </div>
</div> </div>
...@@ -1185,6 +1183,51 @@ ...@@ -1185,6 +1183,51 @@
</div> </div>
</div> </div>
</el-form> </el-form>
<el-dialog custom-class='w600' title='合同复制' :visible.sync="dialogVisible" center>
<input type="button" v-if="backGuest.length>0" class="TCbtn-info" style="padding:8px 10px;float:right;margin-bottom:10px;" @click="copyContract()" value="批量复制合同"/>
<table border="0" cellspacing="0" cellpadding="0" class="singeRowTable">
<tr>
<th>旅客姓名</th>
<th>电话</th>
</tr>
<tr v-for="(item,index) in backGuest">
<td>{{item.surName+''+item.name}}</td>
<td>{{item.mobilePhone}}</td>
</tr>
<tr v-if="backGuest.length==0">
<td colspan="2">已经复制完成</td>
</tr>
</table>
</el-dialog>
<el-dialog custom-class='w600' title='发送信息' :visible.sync="msgDialog" center>
<input type="button" class="TCbtn-info" style="padding:8px 10px;float:right;margin-bottom:10px;" @click="sendMsg()" value="发送短信"/>
<table border="0" cellspacing="0" cellpadding="0" class="singeRowTable">
<tr>
<th>
<label for="label" @change="getCkAll">
<input type="checkbox" id="label" v-model="ckedAll" >全选
</label>
</th>
<th>旅客姓名</th>
<th>电话</th>
<th>发送状态</th>
</tr>
<tr v-for="(item,index) in msgGuest">
<td>
<input v-model="item.checked" type="checkbox"/>
</td>
<td>{{item.clientName}}</td>
<td>{{item.clientCall}}</td>
<td>
<span v-if="item.msgSendStatus==0">未发送</span>
<span v-else-if="item.msgSendStatus==3">发送成功</span>
<span v-else>发送失败</span>
</td>
</tr>
</table>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -1239,13 +1282,17 @@ ...@@ -1239,13 +1282,17 @@
//查询参数 //查询参数
msg:{ msg:{
TCID:0, TCID:0,
orderID:0 orderID:0,
guestId:0
}, },
addMsg: { addMsg: {
Country: 0, Country: 0,
Province: 0, Province: 0,
City: 0 City: 0
}, },
dialogVisible:false,
//发送短信
msgDialog:false,
//参数 //参数
CtObj:{ CtObj:{
//基本信息 //基本信息
...@@ -1364,7 +1411,12 @@ ...@@ -1364,7 +1411,12 @@
//交通 //交通
trifficList:[], trifficList:[],
//行程 //行程
tripDays:[] tripDays:[],
//旅客名单
backGuest:[],
//短信旅客名单
msgGuest:[],
ckedAll:false,
}; };
}, },
methods: { methods: {
...@@ -1551,6 +1603,7 @@ ...@@ -1551,6 +1603,7 @@
this.apiJavaPost("/api/contract/dosaveOrUpdate",this.CtObj,res => { this.apiJavaPost("/api/contract/dosaveOrUpdate",this.CtObj,res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.dialogVisible=false;
this.getList(); this.getList();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -1563,6 +1616,7 @@ ...@@ -1563,6 +1616,7 @@
name: 'TravelContractDetail', name: 'TravelContractDetail',
query: { query: {
TCID: this.$route.query.TCID, TCID: this.$route.query.TCID,
guestId:this.CtObj.guestId,
orderID: this.$route.query.orderID, orderID: this.$route.query.orderID,
blank: "y", blank: "y",
} }
...@@ -1684,6 +1738,88 @@ ...@@ -1684,6 +1738,88 @@
getDayAddOne(day,num){ getDayAddOne(day,num){
return moment(day).add(num,'days').format('MM/DD'); return moment(day).add(num,'days').format('MM/DD');
}, },
//点击合同获取旅客信息
getGuestList(){
let msg={
orderId:this.msg.orderID
}
this.apiJavaPost("/api/contract/getContractGuestByOrderId",msg,res => {
if (res.data.resultCode === 1) {
this.backGuest=res.data.data;
} else {
this.Error(res.data.message);
}
},null);
},
//获取旅客短信列表
getMsgList(){
let msg={
orderId:this.msg.orderID
}
this.apiJavaPost("/api/contract/sendMsgList",msg,res => {
if (res.data.resultCode === 1) {
this.msgGuest=res.data.data;
this.msgGuest.forEach(x=>{
x.checked=false;
})
} else {
this.Error(res.data.message);
}
},null);
},
//复制合同
copyContract(){
let newArr=[];
this.guestList.forEach(x=>{
newArr.push(x.id);
})
this.CtObj.guestIds=newArr.join(',');
this.submitForm('CtObj');
},
//点击全选
getCkAll(){
var that=this;
if(that.ckedAll){
this.msgGuest.forEach(x=>{
x.checked = true;
})
}else{
this.msgGuest.forEach(x=>{
x.checked = false;
})
}
},
//发送短信
sendMsg(){
let msgObj=[];
let dateTime = moment(this.CtObj.startDate).format("YYYY-MM-DD");
let lineTeam = this.CtObj.productName;
let days = this.CtObj.dayNum;
let nights = this.CtObj.nightNum;
this.msgGuest.forEach(x=>{
let obj={};
if(x.checked){
obj.mobiles=x.clientCall;
obj.Url=`http://yx.oytour.com/#/clientConfirm?TCID=${this.msg.TCID}&orderID=${this.msg.orderID}&guestId=${x.guestId}`;
msgObj.push(obj);
}
})
let msg={
msgObj:msgObj,
dateTime:dateTime,
lineTeam:lineTeam,
days:days,
nights:nights,
orderID:this.msg.orderID
}
this.apiJavaPost("/api/contract/sendMassage",msg,res => {
if (res.data.resultCode === 1) {
this.getMsgList();
} else {
this.Error(res.data.message);
}
},null);
},
GetTrip(id, TCID) { GetTrip(id, TCID) {
this.tripList = []; this.tripList = [];
this.startDate = ''; this.startDate = '';
...@@ -2095,6 +2231,7 @@ ...@@ -2095,6 +2231,7 @@
this.GetCounrty(); this.GetCounrty();
this.msg.TCID = this.$route.query.TCID; this.msg.TCID = this.$route.query.TCID;
this.msg.orderID = this.$route.query.orderID; this.msg.orderID = this.$route.query.orderID;
this.msg.guestId = this.$route.query.guestId;
this.getList(); this.getList();
this.GetTrip(0,this.msg.TCID); this.GetTrip(0,this.msg.TCID);
this.$nextTick(function () { this.$nextTick(function () {
......
...@@ -933,9 +933,9 @@ ...@@ -933,9 +933,9 @@
.GO_Contract { .GO_Contract {
color: blue; color: blue;
display: block; display: inline-block;
cursor: pointer; cursor: pointer;
max-width: 200px; margin-right:20px;
} }
.RegistrationList .leftSetInfo,.RegistrationList .GO_TPright{ .RegistrationList .leftSetInfo,.RegistrationList .GO_TPright{
float:left; float:left;
...@@ -1911,8 +1911,16 @@ ...@@ -1911,8 +1911,16 @@
<!-- <span>暂无名单</span>--> <!-- <span>暂无名单</span>-->
<!-- </p>--> <!-- </p>-->
<span>房间信息:{{item.OrderGuestHouseStr}}</span> <span>房间信息:{{item.OrderGuestHouseStr}}</span>
<span v-if="item.ContractNum==''" class="GO_Contract" @click="goContract(item)">领取合同</span> <div v-if="item.ContractNum.length==0">
<span v-else class="GO_Contract" @click="goContract(item)">{{item.ContractNum}}</span> <span class="GO_Contract" @click="goContract(item,{})">领取合同</span>
</div>
<div v-else>
<span v-for="sItem in item.ContractNum" class="GO_Contract" @click="goContract(item,sItem)">
{{sItem.Client_Name+''+sItem.ContractNum}}
</span>
</div>
<!-- <span v-if="item.ContractNum==''" class="GO_Contract" @click="goContract(item)">领取合同</span>
<span v-else class="GO_Contract" @click="goContract(item)">{{item.ContractNum}}</span> -->
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -2246,8 +2254,14 @@ ...@@ -2246,8 +2254,14 @@
style="text-decoration:underline;color:blue;cursor:pointer" v-for="(id,i) in childItem.TipFrId" style="text-decoration:underline;color:blue;cursor:pointer" v-for="(id,i) in childItem.TipFrId"
:key="i">{{id}}</span> :key="i">{{id}}</span>
</span> </span>
<span v-if="childItem.ContractNum==''" class="GO_Contract" @click="goContract(childItem)">领取合同</span> <div v-if="childItem.ContractNum.length==0">
<span v-else class="GO_Contract" @click="goContract(childItem)">{{childItem.ContractNum}}</span> <span class="GO_Contract" @click="goContract(childItem,{})">领取合同</span>
</div>
<div v-else>
<span v-for="sItem in childItem.ContractNum" class="GO_Contract" @click="goContract(childItem,sItem)">
{{sItem.Client_Name+''+sItem.ContractNum}}
</span>
</div>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -5305,28 +5319,29 @@ ...@@ -5305,28 +5319,29 @@
}, },
//跳转至领取合同 //跳转至领取合同
goContract(item) { goContract(item,sItem) {
if (item.ContractNum) { // if (item.ContractNum) {
let routeData = this.$router.resolve({ // let routeData = this.$router.resolve({
name: 'TravelContractDetail', // name: 'TravelContractDetail',
query: { // query: {
TCID: item.TCID, // TCID: item.TCID,
orderID: item.OrderId, // orderID: item.OrderId,
blank: 'y' // blank: 'y'
} // }
}) // })
window.open(routeData.href, '_blank') // window.open(routeData.href, '_blank')
} else { // } else {
let routeData = this.$router.resolve({ let routeData = this.$router.resolve({
name: 'TravelContractNew', name: 'TravelContractNew',
query: { query: {
TCID: item.TCID, TCID: item.TCID,
guestId:sItem.GuestId,
orderID: item.OrderId, orderID: item.OrderId,
blank: 'y' blank: 'y'
} }
}) })
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
} // }
}, },
Discount(TCID) { Discount(TCID) {
this.SpecialOffer = true this.SpecialOffer = true
......
...@@ -1522,7 +1522,8 @@ ...@@ -1522,7 +1522,8 @@
//查询参数 //查询参数
msg:{ msg:{
TCID:0, TCID:0,
orderID:0 orderID:0,
guestId:0
}, },
//数据源 //数据源
dataList:[], dataList:[],
...@@ -2077,6 +2078,7 @@ ...@@ -2077,6 +2078,7 @@
mounted() { mounted() {
this.msg.TCID = this.$route.query.TCID; this.msg.TCID = this.$route.query.TCID;
this.msg.orderID = this.$route.query.orderID; this.msg.orderID = this.$route.query.orderID;
this.msg.guestId = this.$route.query.guestId;
var h = window.screen.height; var h = window.screen.height;
var cHeight=document.getElementsByClassName("CliSignDiv")[0]; var cHeight=document.getElementsByClassName("CliSignDiv")[0];
cHeight.style.height=900+'px'; cHeight.style.height=900+'px';
......
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