Commit 57fd1c38 authored by youjie's avatar youjie

no message

parent edf4fbcd
...@@ -493,7 +493,7 @@ ...@@ -493,7 +493,7 @@
</template> </template>
<el-tooltip content="配置手配费" placement="top"> <el-tooltip content="配置手配费" placement="top">
<el-switch <el-switch
v-model="isHandFee"> v-model="isHandFee" @change="getHandFee">
</el-switch> </el-switch>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -502,26 +502,27 @@ ...@@ -502,26 +502,27 @@
<p> <p>
手配费: 手配费:
<span> <span>
<el-select v-model='HandFee.Id' class="w135 _border_b_1" @change="chooseHandFee"> <el-select v-model='HandFee.BranchId' class="w135 _border_b_1" @change="chooseHandFee">
<el-option v-for='item in HandFeeList' <el-option v-for='item in HandFeeList'
:label='item.Name' :label='item.BranchName'
:value='item.Id' :value='item.BranchId'
:key='item.Id'> :key='item.BranchId'>
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
<template v-if="HandFeeDetail"> <template v-if="HandFeeDetail">
适用公司:{{HandFeeDetail.BranchName}} <span style="margin-left: 20px;">手配费币种:{{HandFeeDetail.CurrencyName}}</span>
手配费币种:{{HandFeeDetail.CurrencyName}}
</template> </template>
<span style="margin-left: 20px;color: red;">注:以下手配费请准确填写、系统将自动生成手配费支出单据</span>
</p> </p>
</div> </div>
<table v-if="HandFeeDetail" class="Receipt_table" border="1" bordercolor="#106BAF" <table v-if="HandFeeDetail&&
HandFeeDetail.DetailList.findIndex((x)=>x.show == true)!=-1"
class="Receipt_table" border="1" bordercolor="#106BAF"
style="border-collapse:collapse;margin-top: 10px;"> style="border-collapse:collapse;margin-top: 10px;">
<tr> <tr>
<!-- <th rowspan="2" width="150">公司</th>
<th rowspan="2" width="150">手配费币种</th> -->
<th colspan="3">明细</th> <th colspan="3">明细</th>
<th rowspan="2">合计</th>
<th rowspan="2">{{$t('hotel.hotel_remark')}}</th> <th rowspan="2">{{$t('hotel.hotel_remark')}}</th>
</tr> </tr>
<tr> <tr>
...@@ -529,28 +530,34 @@ ...@@ -529,28 +530,34 @@
<th width="100">数量</th> <th width="100">数量</th>
<th width="100">金额</th> <th width="100">金额</th>
</tr> </tr>
<tr class="addList1" v-for="(x,index) in HandFeeDetail.HandFeeList"> <template v-for="(x,index) in HandFeeDetail.DetailList">
<!-- <td :rowspan="HandFeeDetail.HandFeeList.length" v-if="index==0"> <tr v-if="x.show" class="addList2">
{{HandFeeDetail.BranchName}} <td>
</td> <!-- <el-select v-model='x.Type' placeholder="选择类型" class="w80 _border_b_1">
<td :rowspan="HandFeeDetail.HandFeeList.length" v-if="index==0"> <el-option v-for='item in TypeListArr'
{{HandFeeDetail.CurrencyName}} :label='item.Name'
</td> --> :value='item.Id'
<td> :key='item.Id'>
<el-select v-model='x.Type' placeholder="选择类型" class="w80 _border_b_1"> </el-option>
<el-option v-for='item in TypeListArr' </el-select> -->
:label='item.Name' <span v-if="x.Type==1"></span>
:value='item.Id' <span v-if="x.Type==2"></span>
:key='item.Id'> <span v-if="x.Type==3"></span>
</el-option> <span v-if="x.Type==4">门票</span>
</el-select> </td>
</td> <td>
<td><el-input v-model="x.Num" type="Number" <el-input v-model="x.Num" type="Number"
@keyup.native="checkInteger(x,'Num')" class="w80 _border_b_1"></el-input></td>
<td><el-input v-model="x.Unit_Price" type="Number" class="w80 _border_b_1"></el-input>
@keyup.native="checkInteger(x,'Number')" class="w80 _border_b_1"></el-input></td> </td>
<td><el-input v-model="x.Remark" type="textarea"></el-input></td> <td><el-input v-model="x.Unit_Price" type="Number"
</tr> @keyup.native="checkInteger(x,'Number')"
class="w80 _border_b_1"></el-input></td>
<td>{{x.Num*x.Unit_Price}}</td>
<td><el-input v-model="x.Remark" type="textarea"></el-input></td>
</tr>
</template>
</table> </table>
</template> </template>
...@@ -774,10 +781,10 @@ export default { ...@@ -774,10 +781,10 @@ export default {
TCID:'', TCID:'',
HandFeeList: [],//手配费配置列表 HandFeeList: [],//手配费配置列表
HandFee:{ HandFee:{
Id:null, BranchId:null,
Type:null Type:null
}, },
HandFeeDetail:null, HandFeeDetail:null,//已选手配费信息
TypeListArr: [ TypeListArr: [
{Name:'房',Id:1,disabled:false}, {Name:'房',Id:1,disabled:false},
{Name:'餐',Id:2,disabled:false}, {Name:'餐',Id:2,disabled:false},
...@@ -788,41 +795,42 @@ export default { ...@@ -788,41 +795,42 @@ export default {
} }
}, },
methods:{ methods:{
getHandFee(){
if(this.isHandFee){
this.chooseHandFee()
}else{
this.msg.HandFeeList = null
this.msg.KingdeeBranchId = null
}
},
chooseHandFee(){ chooseHandFee(){
if(this.msg.detailList.length==0) return if(this.msg.detailList.length>0){
let HandFeeObj = this.HandFeeList.map(item=>{if(item.Id==this.HandFee.Id) return item}) let HandFeeObj = this.HandFeeList.map(item=>{if(item.BranchId==this.HandFee.BranchId) return item})
this.HandFeeDetail = HandFeeObj[0]
let numToFANG = 0
let numToCAN = 0
let numToCE = 0
let numToMEN = 0
this.msg.detailList.forEach((x,index)=>{ this.msg.detailList.forEach((x,index)=>{
let obj = JSON.parse(JSON.stringify(x))
if(x.CostTypeName.indexOf('房')!=-1 if(x.CostTypeName.indexOf('房')!=-1
||x.CostTypeName.indexOf('餐')!=-1 ||x.CostTypeName.indexOf('餐')!=-1
||x.CostTypeName.indexOf('车')!=-1 ||x.CostTypeName.indexOf('车')!=-1
||x.CostTypeName.indexOf('门票')!=-1){ ||x.CostTypeName.indexOf('门票')!=-1){
let Obj = { this.HandFeeDetail.DetailList.forEach((y,indexs)=>{
Type: null, if(x.CostTypeName.indexOf('房')!=-1&&y.Type==1){y.show=true,numToFANG+=Number(obj.Number),y.Num=numToFANG}
Unit_Price: x.UnitPrice, if(x.CostTypeName.indexOf('餐')!=-1&&y.Type==2){y.show=true,numToCAN+=Number(obj.Number),y.Num=numToCAN}
Num: x.Number, if(x.CostTypeName.indexOf('车')!=-1&&y.Type==3){y.show=true,numToCE+=Number(obj.Number),y.Num=numToCE}
Remark: null if(x.CostTypeName.indexOf('门票')!=-1&&y.Type==4){y.show=true,numToMEN+=Number(obj.Number),y.Num=numToMEN}
}
if(x.CostTypeName.indexOf('房')!=-1){Obj.Type=1}
if(x.CostTypeName.indexOf('餐')!=-1){Obj.Type=2}
if(x.CostTypeName.indexOf('车')!=-1){Obj.Type=3}
if(x.CostTypeName.indexOf('门票')!=-1){Obj.Type=4}
let isPush = true
HandFeeObj[0].HandFeeList.forEach((y,indexs)=>{
if(index==indexs){
isPush = false
y.Type = Obj.Type
y.Unit_Price = x.UnitPrice
y.Num = x.Number
}
}) })
if(isPush&&HandFeeObj[0].HandFeeList.length<5) HandFeeObj[0].HandFeeList.push(JSON.parse(JSON.stringify(Obj)))
} }
}) })
}else{
this.HandFeeDetail = HandFeeObj[0] this.HandFeeDetail.DetailList.forEach((y,indexs)=>{
// this.$forceUpdate() y.show=false
// console.log(this.HandFeeDetail) })
}
}, },
//获取手配费所有配置 //获取手配费所有配置
GetHandFeeList() { GetHandFeeList() {
...@@ -833,12 +841,17 @@ export default { ...@@ -833,12 +841,17 @@ export default {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let arrList = function(arr){ let arrList = function(arr){
arr.forEach(item=>{ arr.forEach(item=>{
item.HandFeeList = [] item.Num = null
item.Remark = null
item.show = false
}) })
} }
arrList(res.data.data) res.data.data.forEach(x=>{
arrList(x.DetailList)
})
this.HandFeeList = res.data.data; this.HandFeeList = res.data.data;
this.HandFee.Id = this.HandFeeList[0].Id this.HandFee.BranchId = this.HandFeeList[0].BranchId
this.HandFeeDetail.CurrencyName = this.HandFeeList[0].CurrencyName
} }
}, },
err => {} err => {}
...@@ -848,6 +861,7 @@ export default { ...@@ -848,6 +861,7 @@ export default {
obj.show = false; obj.show = false;
this.msg.Description=this.Description; this.msg.Description=this.Description;
this.msg.detailList.splice(i,1); this.msg.detailList.splice(i,1);
this.chooseHandFee()
this.$forceUpdate(); this.$forceUpdate();
}, },
IsPublicChange(val){ IsPublicChange(val){
...@@ -1028,7 +1042,31 @@ export default { ...@@ -1028,7 +1042,31 @@ 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.isHandFee){
this.msg.KingdeeBranchId = this.HandFeeDetail.BranchId
this.msg.HandFeeList = []
for(let i=0;i<4;i++){
if(this.HandFeeDetail.DetailList[i].show&&(!this.HandFeeDetail.DetailList[i].Num
||!this.HandFeeDetail.DetailList[i].Unit_Price)){
this.Error('手配费数量及金额需大于0')
return
}
}
this.HandFeeDetail.DetailList.forEach(x=>{
let obj={
Type:x.Type,
Num:x.Num,
Unit_Price:x.Unit_Price,
Remark:x.Remark
}
if(x.show){
this.msg.HandFeeList.push(JSON.parse(JSON.stringify(obj)))
}
})
}
// console.log(this.msg,'----HandFeeList',this.msg.KingdeeBranchId)
// return
if(z){ if(z){
this.msg.Status = 0; this.msg.Status = 0;
}else{ }else{
...@@ -1036,6 +1074,7 @@ export default { ...@@ -1036,6 +1074,7 @@ export default {
if(this.msg.detailList.length<1)return this.$message.error(this.$t('rule.qtxzsyxfyshuoming')); if(this.msg.detailList.length<1)return this.$message.error(this.$t('rule.qtxzsyxfyshuoming'));
if(this.msg.PayDate==='') return this.$message.error(this.$t('rule.qxzyjfkshijian')); if(this.msg.PayDate==='') return this.$message.error(this.$t('rule.qxzyjfkshijian'));
} }
if(this.msg.IsPublic!=8&&this.msg.IsPublic!=9){ if(this.msg.IsPublic!=8&&this.msg.IsPublic!=9){
if(this.msg.ClientType==='')return this.$message.error(this.$t('rule.qxzfkduixiang')); if(this.msg.ClientType==='')return this.$message.error(this.$t('rule.qxzfkduixiang'));
}else{ }else{
......
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