Commit dd70a0dd authored by huangyuanyuan's avatar huangyuanyuan

名单

parent 1b4b08cb
...@@ -398,8 +398,8 @@ ...@@ -398,8 +398,8 @@
</div> </div>
<div class="_remark"> <div class="_remark">
<p>{{$t('system.label_info')}}</p> <p>{{$t('system.label_info')}}</p>
<textarea v-model="msg.Description"> <textarea v-model="Description">
</textarea> </textarea>
</div> </div>
<div class="" > <div class="" >
...@@ -1047,6 +1047,11 @@ export default { ...@@ -1047,6 +1047,11 @@ export default {
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
}, },
AddFinancial(z){ //保存 AddFinancial(z){ //保存
if(this.orderObj!=null&&this.orderObj.OrderSource===8&&this.orderObj.tipObj==1){
let tipguestInfo = JSON.parse(sessionStorage.getItem("TipGuestList"));
this.msg.TipGuestList=tipguestInfo;
}
if(z){ if(z){
this.msg.Status = 0; this.msg.Status = 0;
}else{ }else{
...@@ -1080,6 +1085,7 @@ export default { ...@@ -1080,6 +1085,7 @@ export default {
this.msg.detailList.forEach(x=>{ this.msg.detailList.forEach(x=>{
delete x.rate; delete x.rate;
}); });
this.loading = true; this.loading = true;
this.apipost('Financial_post_Set',this.msg,res=>{ this.apipost('Financial_post_Set',this.msg,res=>{
if(res.data.resultCode==1){ if(res.data.resultCode==1){
...@@ -1479,7 +1485,18 @@ export default { ...@@ -1479,7 +1485,18 @@ export default {
}, },
}, },
created(){ created(){
let that=this;
this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null; this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null;
if(this.orderObj!=null&&this.orderObj.OrderSource===8&&this.orderObj.tipObj==1){
that.Description="旅客名单:";
that.describeList=JSON.parse(sessionStorage.getItem("TipGuestList"));
if(that.describeList){
that.describeList.forEach(item=>{
that.Description+=item.GuestName+" ";
})
}
}
}, },
mounted(){ mounted(){
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
padding: 20px; padding: 20px;
height: 200px; height: 200px;
} }
.tipTable tr td{
height: 30px!important;
}
.TeamBalancePayment .singeRowTable tr th { .TeamBalancePayment .singeRowTable tr th {
height: 30px; height: 30px;
} }
...@@ -146,6 +148,7 @@ ...@@ -146,6 +148,7 @@
overflow:auto; overflow:auto;
margin-bottom:0!important; margin-bottom:0!important;
} }
</style> </style>
<template> <template>
...@@ -289,6 +292,8 @@ ...@@ -289,6 +292,8 @@
<div class="clearfix TB_PrintDiv"> <div class="clearfix TB_PrintDiv">
<div class="TB_comtitle TB-Title">收入</div> <div class="TB_comtitle TB-Title">收入</div>
<template v-if="IsHaveAuth"> <template v-if="IsHaveAuth">
<input type="button" value="团队小费" class="hollowFixedBtn TeamAddBtn" v-show="ishowBtn"
@click="AddTipDiv" />
<input type="button" value="新增" class="hollowFixedBtn TeamAddBtn" v-show="ishowBtn" <input type="button" value="新增" class="hollowFixedBtn TeamAddBtn" v-show="ishowBtn"
@click="AddIncomeDetail" /> @click="AddIncomeDetail" />
</template> </template>
...@@ -1350,12 +1355,44 @@ ...@@ -1350,12 +1355,44 @@
<button class="hollowFixedBtn" @click="initZhuanMsg">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" @click="initZhuanMsg">{{$t('pub.cancelBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 团队小费 -->
<el-dialog custom-class="tipdialog" width="500px" title="团队小费" :visible.sync="tipdialog" center>
<table class="singeRowTable tipTable" border="0" cellspacing="0" cellpadding="0" style=" border-spacing:0 10px;" v-loading="tiploading">
<tr>
<th class="text_left"> <input type="checkbox" @change="checkAll" v-model="checkd" ></th>
<th>订单号</th>
<th>旅客名称</th>
<th>平均小费</th>
<th>财务单据</th>
</tr>
<tr v-for="(item,index) in tipPeopleList" :key="index">
<td class="text_left"> <input type="checkbox" :disabled="item.FinanceId!=0" v-model="checkList" :value="item.GuestId" @change="checkThis"></td>
<td>{{item.OrderId}}</td>
<td>{{item.GuestName}}</td>
<td>{{item.Money}}</td>
<td>
<span v-if="item.FinanceId==0">未录入</span>
<span v-else>{{item.FinanceId}}</span>
</td>
</tr>
<tr v-if="tipPeopleList.length==0">
<td colspan="17" align="center">名单已全部录入</td>
</tr>
</table>
<div slot="footer" class="dialog-footer">
<button @click="SaveTip" class="normalBtn" type="primary">保存</button>
<button class="hollowFixedBtn">取消</button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
tipdialog:false,
gridData: [], gridData: [],
TCID: 0, TCID: 0,
//数据列表 //数据列表
...@@ -1432,9 +1469,88 @@ ...@@ -1432,9 +1469,88 @@
otheryTotalsf: 0, otheryTotalsf: 0,
}, },
HangingList: [], HangingList: [],
tipPeopleList:[],
checkList:[],
checkd:false,
tiploading:false,
checkListAll:[],
}; };
}, },
methods: { methods: {
SaveTip(){
if(this.checkList.length==0){
this.Error("至少选择一个旅客!");
return;
}
let arr=[];
this.tipPeopleList.forEach(x=>{
this.checkList.forEach(y=>{
if(x.GuestId==y){
let obj={
OrderId:x.OrderId,
GuestId:x.GuestId,
GuestName:x.GuestName,
TCID:this.TCID,
};
arr.push(obj);
}
})
sessionStorage.setItem("TipGuestList",JSON.stringify(arr))
var TCArr = [this.TCID];
let orderObj = {
OrderID: 0,
OrderSource: 8,
tipObj:1,
Obj: {},
TCIDList: TCArr
}
this.$router.push({
name: "ChoiceAddFinancialDocuments",
query: {
Type: 1,
companyID: this.OutBranchId,
'blank': 'y',
'orderObj': JSON.stringify(orderObj)
}
});
this.tipdialog=false;
})
},
checkThis(){ // 单选
if(this.checkList.length==this.checkListAll.length){
this.checkd = true
return
}
this.checkd = false
},
checkAll(){ //全选
if(this.checkList.length==this.checkListAll.length){
this.checkList=[]
return
}
this.checkList = this.checkListAll;
},
AddTipDiv(){
this.tiploading=true;
this.apipost('sellorder_post_GetNoEntryTipMoneyGuestList', {TCID:this.TCID}, res => {
this.tiploading=false;
if (res.data.resultCode == 1) {
this.tipPeopleList=res.data.data;
this.tipPeopleList.forEach(x=>{
if(x.FinanceId==0){
this.checkListAll.push(x.GuestId)
}
})
} else {
this.$message.error(res.data.message);
}
}, null)
this.tipdialog=true;
},
//判断数组包含字符串 //判断数组包含字符串
isExists(array, str) { isExists(array, str) {
var flag = false; var flag = false;
......
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