|
@@ -58,7 +58,7 @@
|
|
|
</div>
|
|
|
<div class="Entry-inif-box">
|
|
|
<label>签证费用描述:</label>
|
|
|
- <el-input style="width:1200px" size="mini" v-model="DomesticFees.visafeesDescription"></el-input>
|
|
|
+ <el-input style="width:900px" size="mini" v-model="DomesticFees.visafeesDescription"></el-input>
|
|
|
<span class="redzhu">{{visabeizhu}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -124,6 +124,11 @@
|
|
|
<el-input-number size="mini" :controls="false" :precision="2" v-model="TotalExpenses.BusinessClass"></el-input-number>
|
|
|
<span>元/人;</span>
|
|
|
</div>
|
|
|
+ <span v-if="JSON.stringify(TicketJudgment) == '{}'" class="redzhu">(机票数据未录入)</span>
|
|
|
+ <div v-else>
|
|
|
+ <span v-if="TicketJudgment.jjcCurrentRate!=TotalExpenses.EconomyClass||TicketJudgment.gwcCurrentRate!=TotalExpenses.BusinessClass" class="redzhu">{{ TicketJudgment.remark }}</span>
|
|
|
+ <el-button v-if="TicketJudgment.jjcCurrentRate!=TotalExpenses.EconomyClass||TicketJudgment.gwcCurrentRate!=TotalExpenses.BusinessClass" type="primary" @click="Fillin" size="mini">填 入</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="Entry-li-inif">
|
|
|
<div class="Entry-inif-box">
|
|
@@ -137,7 +142,20 @@
|
|
|
<label>{{item.currencyName}}汇率:</label>
|
|
|
<el-input-number size="mini" :controls="false" :precision="4" v-model="item.rate"></el-input-number>
|
|
|
</div>
|
|
|
- <span class="redzhu">(注:请先修改汇率在添加数据,否则请删除在添加!)</span>
|
|
|
+ <el-popover
|
|
|
+ placement="top"
|
|
|
+ width="402"
|
|
|
+ trigger="hover">
|
|
|
+ <el-table border :data="currencyss">
|
|
|
+ <el-table-column width="100" property="currName" label="币种"></el-table-column>
|
|
|
+ <el-table-column width="100" property="rate" label="汇率"></el-table-column>
|
|
|
+ <el-table-column width="200" property="lastUpdateDt" label="更新时间"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- <el-button slot="reference">click 激活</el-button> -->
|
|
|
+ <span v-show="cubtn" slot="reference" class="redzhu">{{CurrencysRemark}}</span>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
+ <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="Entry-form-li">
|
|
@@ -524,7 +542,7 @@
|
|
|
<script>
|
|
|
|
|
|
import { Decimal } from 'decimal.js'
|
|
|
-
|
|
|
+import {debounce} from '../../store/statice'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -653,7 +671,12 @@ export default {
|
|
|
|
|
|
storageid:0,
|
|
|
visabeizhu:"",
|
|
|
- ID:''
|
|
|
+ ID:'',
|
|
|
+ TicketJudgment:{},
|
|
|
+ CurrencysRemark:'',
|
|
|
+ //监听币种数组
|
|
|
+ watchedPrice: null,
|
|
|
+ cubtn:false,
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
@@ -686,33 +709,72 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//获取签证标注
|
|
|
- GetEnterExitCostCorrelationTips(){
|
|
|
- this.TotalExpenses.EconomyClass=0;
|
|
|
- this.TotalExpenses.BusinessClass=0;
|
|
|
- this.DomesticFees.visafees=0;
|
|
|
- this.DomesticFees.visafeesDescription="";
|
|
|
- var url = "/api/Groups/GetEnterExitCostCorrelationTips"
|
|
|
- var that = this
|
|
|
- this.$axios({
|
|
|
- method: 'post',
|
|
|
- url: url,
|
|
|
- headers: {
|
|
|
- Authorization: 'Bearer ' + this.token
|
|
|
- },
|
|
|
- data:{
|
|
|
- portType: 1,
|
|
|
- diId:that.value
|
|
|
- }
|
|
|
- }).then(function (res) {
|
|
|
- if(res.data.code==200){
|
|
|
- that.TotalExpenses.EconomyClass=res.data.data.airData.jjcCurrentRate;
|
|
|
- that.TotalExpenses.BusinessClass=res.data.data.airData.gwcCurrentRate;
|
|
|
- that.DomesticFees.visafees=res.data.data.visaData.feeTotal;
|
|
|
- that.DomesticFees.visafeesDescription=res.data.data.visaData.remark;
|
|
|
- }else{
|
|
|
- that.$message.error(res.data.msg);
|
|
|
- }
|
|
|
- })
|
|
|
+ GetEnterExitCostCorrelationTips(val){
|
|
|
+ if(val==1){
|
|
|
+ this.TotalExpenses.EconomyClass=0;
|
|
|
+ this.TotalExpenses.BusinessClass=0;
|
|
|
+ this.DomesticFees.visafees=0;
|
|
|
+ this.DomesticFees.visafeesDescription="";
|
|
|
+ var url = "/api/Groups/GetEnterExitCostCorrelationTips"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ diId:that.value
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.TotalExpenses.EconomyClass=res.data.data.airData.jjcCurrentRate;
|
|
|
+ that.TotalExpenses.BusinessClass=res.data.data.airData.gwcCurrentRate;
|
|
|
+ that.DomesticFees.visafees=res.data.data.visaData.feeTotal;
|
|
|
+ that.DomesticFees.visafeesDescription=res.data.data.visaData.remark;
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ var url = "/api/Groups/GetEnterExitCostCorrelationTips"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + this.token
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ portType: 1,
|
|
|
+ diId:that.value
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if(res.data.code==200){
|
|
|
+ that.TicketJudgment=res.data.data.airData;
|
|
|
+ that.currencyss=res.data.data.reteInfos;
|
|
|
+ console.log(that.currencys);
|
|
|
+ console.log(that.currencyss);
|
|
|
+ for(let s=0;s<that.currencys.length;s++){
|
|
|
+ if(that.currencys[s].rate!=that.currencyss[s].rate){
|
|
|
+ that.cubtn=true;
|
|
|
+ that.CurrencysRemark='当前汇率与实时汇率不同!移上查看'
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ that.cubtn=false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //机票费用填入
|
|
|
+ Fillin(){
|
|
|
+ this.TotalExpenses.EconomyClass=this.TicketJudgment.jjcCurrentRate;
|
|
|
+ this.TotalExpenses.BusinessClass=this.TicketJudgment.gwcCurrentRate;
|
|
|
},
|
|
|
//获取费用标注
|
|
|
GetNationalTravelFeeData(){
|
|
@@ -1208,16 +1270,17 @@ export default {
|
|
|
that.storageid=res.data.data.id;
|
|
|
// that.GetNationalTravelFeeData();
|
|
|
that.fullscreenLoading=false;
|
|
|
- //that.GetEnterExitCostCorrelationTips();
|
|
|
+ that.GetEnterExitCostCorrelationTips(2);
|
|
|
}else{
|
|
|
that.fullscreenLoading=false;
|
|
|
- that.GetEnterExitCostCorrelationTips();
|
|
|
+ that.GetEnterExitCostCorrelationTips(1);
|
|
|
that.$message.warning(res.data.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//全部清空
|
|
|
cleanout(){
|
|
|
+ this.fullscreenLoading=true
|
|
|
this.$confirm('此操作将全部清空, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -1258,12 +1321,12 @@ export default {
|
|
|
},
|
|
|
//下拉
|
|
|
handNodeClick(data,node,e){
|
|
|
- console.log(data)
|
|
|
- console.log(node)
|
|
|
- console.log(e)
|
|
|
+ // console.log(data)
|
|
|
+ // console.log(node)
|
|
|
+ // console.log(e)
|
|
|
this.treeDataValue= data.name
|
|
|
this.treeData= data.name
|
|
|
- console.log(this.treeData)
|
|
|
+ // console.log(this.treeData)
|
|
|
},
|
|
|
//住宿地区选择
|
|
|
changeSelect(val,item,index){
|
|
@@ -1493,8 +1556,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//保存
|
|
|
- storage(){
|
|
|
+ storage:debounce(function(){
|
|
|
//住宿费
|
|
|
+ this.fullscreenLoading=true
|
|
|
var quarterageDatas=[];
|
|
|
for(let m=0;m<this.quarterageData.length;m++){
|
|
|
if(this.quarterageData[m].nationalTravelFeeId!=''){
|
|
@@ -1563,7 +1627,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.storageAPI(quarterageDatas,boardWagesDatas,miscellaneousFeeDatas,trainingExpenseDatas)
|
|
|
- },
|
|
|
+ },5000,true),
|
|
|
//保存API
|
|
|
storageAPI(arrthre,arrfour,arrfive,arrsix){
|
|
|
var url = "/api/Groups/PostEnterExitCostOperate"
|
|
@@ -1825,6 +1889,17 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ //填入实时汇率
|
|
|
+ adoptRealtime(){
|
|
|
+ for(let at=0;at<this.currencys.length;at++){
|
|
|
+ for(let rt=0;rt<this.currencyss.length;rt++){
|
|
|
+ if(this.currencys[at].currencyCode==this.currencyss[rt].currCode){
|
|
|
+ this.currencys[at].rate=this.currencyss[rt].rate
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.cubtn=false;
|
|
|
+ }
|
|
|
},
|
|
|
filters: {
|
|
|
numFilter (value) {
|
|
@@ -1948,7 +2023,54 @@ export default {
|
|
|
immediate: true,
|
|
|
deep: true // 可以深度检测到 person 对象的属性值的变化
|
|
|
},
|
|
|
-
|
|
|
+ //监听汇率数组是否变化
|
|
|
+ currencys:{
|
|
|
+ handler(val){
|
|
|
+ console.log(val);
|
|
|
+ // console.log(this.quarterageData);
|
|
|
+ //住宿费
|
|
|
+ this.TotalAccommodationFee=0
|
|
|
+ for(let q=0;q<this.quarterageData.length;q++){
|
|
|
+ for(let qc=0;qc<this.currencys.length;qc++){
|
|
|
+ if(this.currencys[qc].currencyCode==this.quarterageData[q].curremcyCode){
|
|
|
+ this.quarterageData[q].subTotal=this.currencys[qc].rate*this.quarterageData[q].cost
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.TotalAccommodationFee+=this.quarterageData[q].subTotal
|
|
|
+ }
|
|
|
+ //伙食费
|
|
|
+ this.TotalMeals=0
|
|
|
+ for(let b=0;b<this.boardWagesData.length;b++){
|
|
|
+ for(let bc=0;bc<this.currencys.length;bc++){
|
|
|
+ if(this.currencys[bc].currencyCode==this.boardWagesData[b].curremcyCode){
|
|
|
+ this.boardWagesData[b].subTotal=this.currencys[bc].rate*this.boardWagesData[b].cost
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.TotalMeals+=this.boardWagesData[b].subTotal
|
|
|
+ }
|
|
|
+ //公杂费
|
|
|
+ this.TotalMiscellaneous=0
|
|
|
+ for(let m=0;m<this.miscellaneousFeeData.length;m++){
|
|
|
+ for(let mc=0;mc<this.currencys.length;mc++){
|
|
|
+ if(this.currencys[mc].currencyCode==this.miscellaneousFeeData[m].curremcyCode){
|
|
|
+ this.miscellaneousFeeData[m].subTotal=this.currencys[mc].rate*this.miscellaneousFeeData[m].cost
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.TotalMiscellaneous+=this.miscellaneousFeeData[m].subTotal
|
|
|
+ }
|
|
|
+ //培训费
|
|
|
+ this.trainingExpense=0
|
|
|
+ for(let t=0;t<this.trainingExpenseData.length;t++){
|
|
|
+ for(let tc=0;tc<this.currencys.length;tc++){
|
|
|
+ if(this.currencys[tc].currencyCode==this.trainingExpenseData[t].curremcyCode){
|
|
|
+ this.trainingExpenseData[t].subTotal=this.currencys[tc].rate*this.trainingExpenseData[t].cost
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.trainingExpense+=this.trainingExpenseData[t].subTotal
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep:true
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|