liuhj il y a 3 mois
Parent
commit
e56e860689
2 fichiers modifiés avec 45 ajouts et 49 suppressions
  1. 27 6
      src/components/MarketplacePick.vue
  2. 18 43
      src/components/OP/EntryDetails.vue

+ 27 - 6
src/components/MarketplacePick.vue

@@ -15,7 +15,7 @@
                     size="medium" v-model.trim="formname" :fetch-suggestions="querySearch"
                     @select="formnameselect">
                 </el-autocomplete>
-                <el-select style="width: 357px;margin-bottom: 10px;" v-model="groupId" clearable placeholder="请选择">
+                <el-select filterable style="width: 357px;margin-bottom: 10px;" v-model="groupId" clearable placeholder="请选择">
                     <el-option v-for="item in groupNames" :key="item.id" :label="item.groupName" :value="item.id">
                     </el-option>
                 </el-select>
@@ -56,7 +56,7 @@
                     </div>
                 </div>
                 <div style="text-align: right;margin-bottom: 25px;">
-                    <el-button @click="GroupOrderPreInfoSave" type="primary">保存</el-button>
+                    <el-button @click="GroupOrderPreInfoSave" type="primary">保 存</el-button>
                 </div>
             </el-form>
         </div>
@@ -127,7 +127,7 @@ export default {
             this.$refs[formName].resetFields();
         },
         //或取基础数据
-        GroupOrderPreInfos() {
+        GroupOrderPreInfos(val) {
             var url = "/api/Groups/GroupOrderPreInfo/"
             var that = this
             this.$axios({
@@ -137,16 +137,19 @@ export default {
                 var basicsdata=res.data.data
                 if (res.data.code==200) {
                     that.tempDatas=basicsdata.tempDatas;
-                    that.tempId=that.tempDatas[0].id;
+                    
                     that.names = basicsdata.names.map((terminal) => {
                         return {
                             id:terminal.id,
                             value: terminal.name,
                         };
                     });
+                    if (!val) {
+                        that.tempId=that.tempDatas[0].id;
+                        that.formid=that.names[0].id;
+                        that.formname=that.names[0].value;
+                    }
                     // that.names=basicsdata.names;
-                    that.formid=that.names[0].id;
-                    that.formname=that.names[0].value;
                     that.groupNames=basicsdata.groupNames.data;
 
                     that.GroupOrderPreInfo();
@@ -251,6 +254,7 @@ export default {
         },
         //获取表单
         GroupOrderPreInfo() {
+            this.controlarr=[];
             var url = "/api/Groups/GroupOrderPreInfo/"+this.formid+"/"+this.tempId
             var that = this
             this.$axios({
@@ -260,6 +264,19 @@ export default {
                 if (res.data.code==200) {
                     that.controlarr=res.data.data.items;
                     that.groupId=res.data.data.groupId==0?'':res.data.data.groupId;
+                    for(let i=0;i<that.controlarr.length;i++){
+                        if(that.controlarr[i].fieldName=='出访国家(地、区)'){
+                            if (that.controlarr[i].newValue.length>0) {
+                                console.log(that.controlarr[i]);
+                                var gjvals = '';
+                                that.controlarr[i].newValue.map((value) => {
+                                    gjvals += value + ','
+                                })
+                                gjvals = gjvals.substring(0, gjvals.length - 1)
+                                that.CityByCountry(gjvals)
+                            }
+                        }
+                    }
                 }else{
                     that.$message.error(res.data.msg);
                 }
@@ -291,6 +308,7 @@ export default {
                         type: 'success',
                         message: res.data.msg
                     });
+                    that.GroupOrderPreInfos(true)
                 }else{
                     that.$message.error(res.data.msg);
                 }
@@ -298,6 +316,8 @@ export default {
         },
 
         GroupOrderPreInfochange(){
+            this.controlarr=[],
+            this.cityarr=[],
             this.GroupOrderPreInfo();
         }
     },
@@ -336,6 +356,7 @@ export default {
     margin-bottom: 10px;
     padding: 0px 5px;
     border: 1px dashed #b0b1b3;
+    border-radius: 5px;
 }
 .marketplacepick-form-li .el-autocomplete{
     width: 100%;

+ 18 - 43
src/components/OP/EntryDetails.vue

@@ -582,6 +582,7 @@
 
 import { Decimal } from 'decimal.js'
 import { debounce } from '../../store/statice'
+import { number } from 'echarts';
 export default {
     data() {
         return {
@@ -708,7 +709,6 @@ export default {
                     that.options = res.data.data.groupNameData;
                     that.currencys = res.data.data.currencyInit;
                     that.viewUsersarr= res.data.data.viewPermissionData;
-                    // console.log(that.value)
                     if (that.value == null) {
                         that.value = res.data.data.groupNameData[0].id;
                     }
@@ -749,9 +749,6 @@ export default {
                         }
 
                     }
-                    console.log(that.othercurrencys);
-                    console.log(that.currencys);
-
                 } else {
                     that.$message.error(res.data.msg);
                 }
@@ -824,7 +821,6 @@ export default {
                 }).then(function (res) {
                     if (res.data.code == 200) {
                         that.TicketJudgment = res.data.data.airData;
-                        console.log(that.TotalExpenses.EconomyClass);
                         if (that.TotalExpenses.EconomyClass==0) {
                             that.TotalExpenses.EconomyClass = that.TicketJudgment.jjcCurrentRate;
                         }
@@ -871,7 +867,6 @@ export default {
                     portType: 1
                 }
             }).then(function (res) {
-                console.log(res)
                 let placeinifarr = [];
                 if (res.data.code == 200) {
                     for (let i = 0; i < res.data.data.length; i++) {
@@ -1439,7 +1434,8 @@ export default {
                     //住宿费
                     that.quarterageData = res.data.data.quarterageData;
                     for (let a = 0; a < res.data.data.quarterageData.length; a++) {
-                        that.TotalAccommodationFee += res.data.data.quarterageData[a].subTotal
+                        
+                        that.TotalAccommodationFee += Number(res.data.data.quarterageData[a].subTotal)
                     }
                     //伙食费
                     that.boardWagesData = res.data.data.boardWagesData;
@@ -1521,12 +1517,8 @@ export default {
         },
         //下拉
         handNodeClick(data, node, e) {
-            // console.log(data)
-            // console.log(node)
-            // console.log(e)
             this.treeDataValue = data.name
             this.treeData = data.name
-            // console.log(this.treeData)
         },
         //sr需求
         SRrequirement(obj) {
@@ -1542,11 +1534,6 @@ export default {
                 this.otherData[l].subTotal = Number(this.otherData[l].cost) * Number(rate);
                 this.otherExpense += this.otherData[l].subTotal;
             }
-            console.log(this.otherData);
-            console.log(rate);
-            console.log(obj.currency);
-
-
         },
         //住宿地区选择
         changeSelect(val, item, index) {
@@ -1566,9 +1553,10 @@ export default {
                 }
             }
             val.subTotal = Number(val.cost) * Number(rate);
+
             this.TotalAccommodationFee = 0;
             for (let a = 0; a < this.quarterageData.length; a++) {
-                this.TotalAccommodationFee += this.quarterageData[a].subTotal
+                this.TotalAccommodationFee += Number(this.quarterageData[a].subTotal.toFixed(2));
             }
             // this.mealschangeSelect(this.boardWagesData,item,index)
         },
@@ -1583,7 +1571,7 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalAccommodationFee = 0;
             for (let a = 0; a < this.quarterageData.length; a++) {
-                this.TotalAccommodationFee += this.quarterageData[a].subTotal
+                this.TotalAccommodationFee += Number(Number(this.quarterageData[a].subTotal).toFixed(2));
             }
         },
         //伙食费费用标准值改变
@@ -1597,7 +1585,8 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalMeals = 0;
             for (let a = 0; a < this.boardWagesData.length; a++) {
-                this.TotalMeals += this.boardWagesData[a].subTotal
+                // this.TotalMeals += this.boardWagesData[a].subTotal
+                this.TotalMeals += Number(Number(this.boardWagesData[a].subTotal).toFixed(2));
             }
         },
         //伙食地区选择
@@ -1650,7 +1639,8 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             this.TotalMiscellaneous = 0;
             for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
-                this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
+                // this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
+                this.TotalMiscellaneous += Number(Number(this.miscellaneousFeeData[a].subTotal).toFixed(2));
             }
         },
         //公杂费地区选择
@@ -1689,12 +1679,11 @@ export default {
             this.TotalMiscellaneous = 0;
             for (let a = 0; a < this.miscellaneousFeeData.length; a++) {
                 this.TotalMiscellaneous += this.miscellaneousFeeData[a].subTotal
+                
             }
         },
         //培训费费用标准值改变
         Traininginput(val) {
-            console.log(val);
-
             var rate = 0
             for (let j = 0; j < this.currencys.length; j++) {
                 if (this.currencys[j].currencyName == val.currencyName) {
@@ -1704,20 +1693,18 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             this.trainingExpense = 0;
             for (let a = 0; a < this.trainingExpenseData.length; a++) {
-                this.trainingExpense += this.trainingExpenseData[a].subTotal
+                // this.trainingExpense += this.trainingExpenseData[a].subTotal
+                this.trainingExpense += Number(Number(this.trainingExpenseData[a].subTotal).toFixed(2));
             }
         },
         //培训费地区选择
         TrainingExpenseDataSelect(val, item) {
-            console.log(val);
-            console.log(this.trainingExpenseData);
             var rate = 0//汇率
             var obj = {}
             obj = this.placeinif.find(function (i) {
                 return i.id === item
             });
             //在change中获取到整条对象数据
-            console.log(obj);
             val.currencyName = obj.currencyName;
             val.currency = obj.currency;
             for (let j = 0; j < this.currencys.length; j++) {
@@ -1759,7 +1746,8 @@ export default {
             val.subTotal = Number(val.cost) * Number(rate);
             this.otherExpense = 0;
             for (let a = 0; a < this.otherData.length; a++) {
-                this.otherExpense += this.otherData[a].subTotal
+                // this.otherExpense += this.otherData[a].subTotal
+                this.otherExpense += Number(Number(this.otherData[a].subTotal).toFixed(2));
             }
         },
         //新增list
@@ -1855,7 +1843,6 @@ export default {
         },
         //保存
         storage: debounce(function () {
-            console.log(this.currencys);
             return new Promise((resolve, reject) => {
                 //住宿费
                 this.fullscreenLoading = true
@@ -1928,8 +1915,6 @@ export default {
                 }
                 //其他费
                 var otherDatas = [];
-                console.log();
-
                 for (let c = 0; c < this.otherData.length; c++) {
                     if (this.otherData[c].setDataId != '') {
                         otherDatas.push({
@@ -2099,8 +2084,6 @@ export default {
                 }
                 //其他费
                 var otherDatas = [];
-                console.log();
-
                 for (let c = 0; c < this.otherData.length; c++) {
                     if (this.otherData[c].setDataId != '') {
                         otherDatas.push({
@@ -2293,7 +2276,6 @@ export default {
         },
         //其他删除
         DeleteOtherExpenses(index, row, rows) {
-            console.log(index, row, rows);
             this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
@@ -2401,7 +2383,6 @@ export default {
                         deleteUserId: that.userId
                     }
                 }).then(function (res) {
-                    console.log(res)
                     if (res.data.code == 200) {
                         that.$message({
                             type: 'success',
@@ -2488,8 +2469,7 @@ export default {
             this.setpermissions=true;
         },
         handleCheckAllChange(val) {
-            console.log(val);
-            console.log(this.viewUsers);
+           
             
         },
         //分配查看权限
@@ -2616,7 +2596,6 @@ export default {
                 this.calculation();
                 // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
                 // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
-                // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
             },
         },
         'TotalExpenses.Firstclasstotal': {
@@ -2624,7 +2603,6 @@ export default {
                 this.calculation();
                 // this.jjctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.EconomyClasstotal;
                 // this.gwctotal=this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal;
-                // console.log(this.DomesticFees.total+this.TotalAccommodationFee+this.TotalMeals+this.TotalMiscellaneous+this.trainingExpense+this.TotalExpenses.BusinessClasstotal)
             },
         },
 
@@ -2673,16 +2651,13 @@ export default {
         currencys: {
             handler(val) {
                 this.TotalAccommodationFee = 0
-                console.log(val,this.quarterageData);
-                console.log(this.currencys);
-                
                 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.currencys[qc].currencyName == this.quarterageData[q].currencyName) {
-                            this.quarterageData[q].subTotal = this.currencys[qc].rate * this.quarterageData[q].cost
+                            this.quarterageData[q].subTotal = (this.currencys[qc].rate * this.quarterageData[q].cost).toFixed(2)
                         }
                     }
-                    this.TotalAccommodationFee += this.quarterageData[q].subTotal
+                    this.TotalAccommodationFee += Number(this.quarterageData[q].subTotal);
                 }
                 //伙食费
                 this.TotalMeals = 0