Przeglądaj źródła

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

liuhj 1 rok temu
rodzic
commit
9655463da7
1 zmienionych plików z 95 dodań i 3 usunięć
  1. 95 3
      src/components/Finance/Cost.vue

+ 95 - 3
src/components/Finance/Cost.vue

@@ -299,6 +299,42 @@
                                 <el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="scope.row[item.prop]">
                                 </el-input>
                             </div>
+                            <div v-else-if="item.prop == 'b' || item.prop == 'l' || item.prop == 'd'">
+                                <el-popover placement="top-start" title="餐食报批费用:" width="200" trigger="hover">
+                                    <div>
+                                        <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
+                                        <div v-if="ShowMeals.length == 0">
+                                            <br/>
+                                            <span style="color:red">暂无数据!</span>
+                                        </div>
+                                        <div v-else>
+                                            <div v-for="(  item, index  ) in ShowMeals" :key="index">
+                                                {{item.countryOrCity}} &nbsp;&nbsp; <span style="color:green;">{{item.price}}</span>元/人<br>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <el-input slot="reference" placeholder="请输入内容" v-model="scope.row[item.prop]">
+                                    </el-input>
+                                </el-popover>
+                            </div>
+                            <div v-else-if="item.prop == 'suite' || item.prop == 'jS_ES' || item.prop == 'sgr'|| item.prop == 'tbr'">
+                                <el-popover placement="top-start" title="酒店报批费用:" width="200" trigger="hover">
+                                    <div>
+                                        <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
+                                        <div v-if="ShowHotel.length == 0">
+                                            <br/>
+                                            <span style="color:red">暂无数据!</span>
+                                        </div>
+                                        <div v-else>
+                                            <div v-for="(  item, index  ) in ShowHotel" :key="index">
+                                                {{item.countryOrCity}} &nbsp;&nbsp; <span style="color:green;">{{item.price}}</span>元/人<br>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <el-input slot="reference" placeholder="请输入内容" v-model="scope.row[item.prop]">
+                                    </el-input>
+                                </el-popover>
+                            </div>
                             <span v-else :title="scope.row[item.prop]"><el-input placeholder="请输入内容"
                                     v-model="scope.row[item.prop]">
                                 </el-input></span>
@@ -631,7 +667,6 @@
     </div>
 </template>
 <script>
-import { C } from '@fullcalendar/core/internal-common';
 
 export default {
     data() {
@@ -2173,6 +2208,9 @@ export default {
                 { "JJC": "jjc" },
                 { "GWC": "gwc" }
             ],
+            ShowBaoPi: [
+
+            ]
         };
     },
     watch: {
@@ -2885,6 +2923,27 @@ export default {
 
                         }
 
+                        var Meals = baoPi.filter(x => {
+                            return x.type == "Meals"
+                        })
+
+                        var Hotel = baoPi.filter(x => {
+                            return x.type == "Hotel"
+                        })
+
+                        var GongZa = baoPi.filter(x => {
+                            return x.type == "GongZa"
+                        })
+
+                        if (Meals.length > 0) {
+                            that.ShowBaoPi.push(Meals[0]);
+                        }
+                        if (Hotel.length > 0) {
+                            that.ShowBaoPi.push(Hotel[0]);
+                        }
+                        if (GongZa.length > 0) {
+                            that.ShowBaoPi.push(GongZa[0]);
+                        }
 
                     } else {
                         for (var m = 0; m < that.sheetDatal.length; m++) {
@@ -2892,7 +2951,7 @@ export default {
                                 that.sheetDatal[m].childList[0].tips = "暂无!";
                             }
                         }
-
+                        that.ShowBaoPi = [];
                     }
 
                 }
@@ -4484,7 +4543,40 @@ export default {
             } else {
                 return 75
             }
-        }
+        },
+        ShowMeals() {
+            if(this.ShowBaoPi.length > 0){
+                var result = this.ShowBaoPi.filter(x => x.type == 'Meals')[0];
+                if(result){
+                    return result.content;
+                }else{
+                    return [];
+                }
+            }
+            return [];
+        },
+        ShowHotel() {
+            if(this.ShowBaoPi.length > 0){
+                var result = this.ShowBaoPi.filter(x => x.type == 'Hotel')[0];
+                if(result){
+                    return result.content;
+                }else{
+                    return [];
+                }
+            }
+            return [];
+        },
+        ShowGongZa() {
+            if(this.ShowBaoPi.length > 0){
+                var result = this.ShowBaoPi.filter(x => x.type == 'GongZa')[0];
+                if(result){
+                    return result.content;
+                }else{
+                    return [];
+                }
+            }
+            return [];
+        },
     }
 }
 </script>