yuanrf пре 1 година
родитељ
комит
98532f15a1
1 измењених фајлова са 58 додато и 29 уклоњено
  1. 58 29
      src/components/OP/OpVisaPriec.vue

+ 58 - 29
src/components/OP/OpVisaPriec.vue

@@ -1,4 +1,3 @@
-
 <template>
     <div class="car_add">
         <div>
@@ -61,16 +60,17 @@
                 </div>
             </el-form>
             <el-form :model="OpVisaPriceData" ref="OpVisaPriceData" :rules="OpVisaPriceDataRules" label-width="100px"
-            class="demo-ruleForm">
-            <div style="width: 100%;">
-                <el-form-item label="此舱位客人名称:" prop="visaClient" label-width="160px">
-                    <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient" placeholder="此舱位客人名称" multiple clearable
-                        filterable >
-                        <el-option v-for="item in fliterClient" :key="item.id" :label="item.lastName+item.firstName" :value="item.id">
-                        </el-option>
-                    </el-select>
-                </el-form-item>
-            </div>
+                class="demo-ruleForm">
+                <div style="width: 100%;">
+                    <el-form-item label="此舱位客人名称:" prop="visaClient" label-width="160px">
+                        <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient"
+                            placeholder="此舱位客人名称" multiple clearable filterable>
+                            <el-option v-for="item in fliterClient" :key="item.id"
+                                :label="item.lastName + item.firstName" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </div>
                 <div style="display: flex;flex-wrap: wrap;">
                     <!-- <div style="width: 25%;">
                         <el-form-item label="签证客户:" prop="visaClient" label-width="160px">
@@ -84,8 +84,8 @@
                             </el-input>
                             <el-select v-model="OpVisaPriceData.visaCurrency" filterable placeholder="币种"
                                 style="width: 35%;">
-                                <el-option v-for="item in currencyList" :key="item.id" :label="item.name" :value="item.id">
-                                </el-option>
+                                <el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
+                                    :value="item.currencyId"></el-option>
                             </el-select>
                         </el-form-item>
                     </div>
@@ -146,7 +146,8 @@
                     </div>
                     <div style="width: 25%;">
                         <el-form-item label="消费日期:" prop="consumptionDate" label-width="160px">
-                            <el-date-picker style="width:100%" v-model="OpVisaPriceData.consumptionDate" placeholder="消费日期" type="date">
+                            <el-date-picker style="width:100%" v-model="OpVisaPriceData.consumptionDate"
+                                placeholder="消费日期" type="date">
                             </el-date-picker>
 
                         </el-form-item>
@@ -157,8 +158,8 @@
                                 :disabled="true">
                             </el-input>
                             <el-select v-model="OpVisaPriceData.visaCurrency" style="width: 45%;" :disabled="true">
-                                <el-option v-for="item in currencyList" :key="item.id" :label="item.name" :value="item.id">
-                                </el-option>
+                                <el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
+                                    :value="item.currencyId"></el-option>
                             </el-select>
                         </el-form-item>
                     </div>
@@ -169,7 +170,8 @@
                             <el-form-item label="卡类型:" prop="ctdId" label-width="160px">
                                 <el-select v-model="OpVisaPriceData.ctdId" placeholder="卡类型" style="width: 100%;"
                                     @change="ctdChange">
-                                    <el-option v-for="item in bankCard" :key="item.id" :label="item.name" :value="item.id">
+                                    <el-option v-for="item in bankCard" :key="item.id" :label="item.name"
+                                        :value="item.id">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
@@ -323,7 +325,7 @@ export default {
             IsAuditGM: 0,
             VisitDate: '',
             passengerTypeSelect: [],
-            fliterClient:[],
+            fliterClient: [],
             transformDateFormat: function (value) {
 
                 // 将value转换为Date对象
@@ -387,7 +389,8 @@ export default {
                 otherBankName: [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },],
                 otherSideNo: [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },],
                 totherSideName: [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },],
-            }
+            },
+            rateList: [],
         }
     },
     methods: {
@@ -442,6 +445,7 @@ export default {
         },
         DiIdSelectChange() {
             var that = this;
+            this.QueryRate();
             for (let index = 0; index < that.delegationInfoList.length; index++) {
                 if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
                     that.delegationInfo = that.delegationInfoList[index];
@@ -496,8 +500,8 @@ export default {
             }
         },
         //选择客户名单
-        clientNamechange(val){
-            this.OpVisaPriceData.visaNumber=val.length;
+        clientNamechange(val) {
+            this.OpVisaPriceData.visaNumber = val.length;
             console.log(this.ClientFormat(this.OpVisaPriceData.visaClient))
         },
         //获取团组客户名单
@@ -516,7 +520,7 @@ export default {
             }).then(function (res) {
                 console.log(res);
                 if (res.data.code == 200) {
-                    that.fliterClient=res.data.data;
+                    that.fliterClient = res.data.data;
                 }
             })
         },
@@ -564,13 +568,13 @@ export default {
             })
         },
         //验证人数W
-        verifytoll(){
-            console.log(Number(this.OpVisaPriceData.visaNumber)+Number(this.OpVisaPriceData.visaFreeNumber)>this.OpVisaPriceData.visaClient.length)
-            if(Number(this.OpVisaPriceData.visaNumber)+Number(this.OpVisaPriceData.visaFreeNumber)>this.OpVisaPriceData.visaClient.length){
+        verifytoll() {
+            console.log(Number(this.OpVisaPriceData.visaNumber) + Number(this.OpVisaPriceData.visaFreeNumber) > this.OpVisaPriceData.visaClient.length)
+            if (Number(this.OpVisaPriceData.visaNumber) + Number(this.OpVisaPriceData.visaFreeNumber) > this.OpVisaPriceData.visaClient.length) {
                 this.$message.error("请检查人数");
                 return
-            }else{
-                this.OpVisaPriceData.visaClient=this.ClientFormat(this.OpVisaPriceData.visaClient);
+            } else {
+                this.OpVisaPriceData.visaClient = this.ClientFormat(this.OpVisaPriceData.visaClient);
             }
         },
         addBtn() {
@@ -653,13 +657,38 @@ export default {
                 result = val;
             }
             return result;
+        },
+        QueryRate() {
+            var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    "portType": 1,
+                    "diId": this.OpVisaPriceData.diId,
+                    "cTable": 80
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    //汇率
+                    console.log("汇率--", res.data.data);
+                    that.rateList = res.data.data.teamRates;
+                }
+            })
+
+
         }
     },
     mounted() {
+        this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
         this.initializeSelect();
-        this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
+        this.QueryRate();
         this.OpVisaPriceData.id = this.$route.query.id;
         this.QueryClientInfoByDIID()
         if (this.OpVisaPriceData.id != null && this.OpVisaPriceData.id != undefined && this.OpVisaPriceData.id != 0) {
@@ -682,7 +711,7 @@ export default {
     padding: 10px;
     box-shadow: 0 0 5px #0005;
     border-radius: 10px;
-    
+
 }
 
 .car_add .communal-title {