yuanrf пре 1 година
родитељ
комит
29f97c4a23
2 измењених фајлова са 135 додато и 9 уклоњено
  1. 132 5
      src/components/Finance/Cost.vue
  2. 3 4
      src/components/OP/EntryDetails.vue

+ 132 - 5
src/components/Finance/Cost.vue

@@ -1,6 +1,35 @@
 <template>
     <div class="cost-all" v-loading.fullscreen.lock="costloading">
         <div class="cost-box">
+
+            <el-dialog width="85%" title="地接历史费用" :visible.sync="historyCarDialog" @close="dialogClose">
+                <div style="display: flex;">
+                    <div style="width: 30%;">
+                        <el-input v-model="historyCarInput" placeholder="请输入城市名称"></el-input>
+                    </div>
+                    <div style="width: 2%;"></div>
+                    <div><el-button type="primary" @click="historyCarSearch">搜索</el-button></div>
+                </div>
+                <br/>
+                <!-- @current-change=""  -->
+                <el-table  @current-change="historyCarChange" highlight-current-row border :data="historyCarData.slice((currentPage - 1) * pageSize, currentPage * pageSize)">
+                    <template slot-scope="scope">
+                        <el-table-column v-for="(item,index) in historyCarCloumns"  :property="item.value" :label="item.label" :key="item.value"></el-table-column>
+                    </template>
+                </el-table>
+                <div class="btn-dialog-cost">
+                    <el-button size="small" @click="historyCarYes" type="primary">采用历史的行程数据</el-button>
+                    &nbsp;&nbsp;&nbsp;
+                    <el-button @click="historyCarDialog = false; historyCarSelectObject = {}" size="small">采用现有的自定义数据</el-button>
+                </div>
+                <div class="block">
+                    <el-pagination align='center' @current-change="handleCurrentChange" :current-page="currentPage"
+                        :page-sizes="[5,7,10,20]" :page-size="pageSize" layout="total, sizes, prev, pager, next"
+                        @size-change="handleSizeChange" :total="historyCarData.length">
+                    </el-pagination>
+                </div>
+            </el-dialog>
+
             <el-dialog width="500" title="机票行程数据" :visible.sync="dialogTableVisible">
                 <el-table border :data="gridData">
                     <el-table-column property="day" label="DAY" width="150"></el-table-column>
@@ -390,6 +419,9 @@
                                     <el-button @click="handleEdit(scope.$index, scope.row, 4)" size="mini"
                                         type="primary">景
                                         点</el-button>
+                                    <el-button class="history-btn" @click="GetHistoryCarData(scope.$index)" size="mini"
+                                        type="primary">历史数据
+                                    </el-button>
                                 </el-row>
                             </div>
                             <div v-else-if="item.width == 100">
@@ -803,7 +835,7 @@
                 </div>
             </div>
         </div>
-        <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false">
+        <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false" @close="dialogClose">
             <div>
                 <div style="display: flex;">
                     <div style="width: 30%;">
@@ -2741,7 +2773,54 @@ export default {
             tableDatas:[],
             dialogTableVisibleXJ:false,
             checkboxsXJ:[],
-
+            historyCarInput:'',
+            historyCarDialog:false,
+            historyCarData:[],
+            // {
+            //         "value": "id",
+            //         "label": ""
+            //     },
+            historyCarCloumns:[
+                {
+                    "value": "teamName",
+                    "label": "团组名称"
+                },
+                {
+                    "value": "start",
+                    "label": "开始时间"
+                },
+                {
+                    "value": "end",
+                    "label": "结束时间"
+                },
+                {
+                    "value": "area",
+                    "label": "地区"
+                },
+               
+                {
+                    "value": "price",
+                    "label": "总价格"
+                },
+                {
+                    "value": "dayPrice",
+                    "label": "单日价格"
+                },
+                {
+                    "value": "priceName",
+                    "label": "费用名称"
+                },
+                {
+                    "value": "priceContent",
+                    "label": "费用明细"
+                },
+                {
+                    "value": "datePrice",
+                    "label": "费用准确日期"
+                }
+            ],
+            historyCarSelectObject:{},
+            historyCarIndex : -1,
         };
     },
     watch: {
@@ -2995,9 +3074,8 @@ export default {
                 this.$message.error('程序异常!');
                 return;
             }
-            if(this.grouptitleinfo.visitCountry.indexOf('、') != -1){
-                this.dialogSearchInput = this.grouptitleinfo.visitCountry;
-            }
+            
+            this.dialogSearchInput = this.grouptitleinfo.visitCountry;
 
             var dataC = this.dialogColumn.filter(x => x.index == buttonIndex);
             if (dataC.length == 0) {
@@ -5750,6 +5828,50 @@ export default {
                 this.$message.error("请选择数据!");
             }      
         },
+        GetHistoryCarData(index){
+            this.historyCarInput = this.grouptitleinfo.visitCountry;
+            this.historyCarDialog = true;
+            this.pageSize = 7;
+            this.historyCarIndex = index;
+            this.historyCarSearch();
+        },
+        historyCarSearch(){
+            var url = "/api/Groups/GetHistoryCarData";
+            var that = this;
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data:{
+                    param:this.historyCarInput
+                }
+            }).then(function (res) {
+                that.historyCarData = [];
+                if (res.data.code == 200) {
+                    console.log(res.data.data)
+                    that.historyCarData = res.data.data;
+                } else {
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
+        dialogClose(){
+            this.pageSize = 5;
+            this.currentPage = 1;
+        },
+        historyCarChange(row, oldrow) {
+            //console.log(row, oldrow);
+            this.historyCarSelectObject = row;
+        },
+        historyCarYes(){
+            //console.log(this.historyCarSelectObject,'historyCarSelectObject');
+            if(this.historyCarIndex != -1){
+                this.tableData[this.historyCarIndex].carCost = this.historyCarSelectObject.dayPrice;
+            }
+            this.historyCarDialog = false;
+        }
     },
     updated() {
         this.$emit('transfer', true)
@@ -6142,4 +6264,9 @@ export default {
     margin-top: 20px;
     text-align: right;
 }
+
+.history-btn {
+    display: flex;
+    justify-content: center;
+}
 </style>

+ 3 - 4
src/components/OP/EntryDetails.vue

@@ -143,7 +143,7 @@
                             <label>{{item.currencyName}}汇率:</label>
                             <el-input-number size="mini"  :controls="false" :precision="4" v-model="item.rate"></el-input-number>
                         </div>
-                        <el-popover
+                        <!-- <el-popover
                         placement="top"
                         width="402"
                         trigger="hover">
@@ -152,11 +152,10 @@
                                 <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>
                         &nbsp;&nbsp;&nbsp;&nbsp;
-                        <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button>
+                        <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button> -->
                     </div>
                 </div>
                 <div class="Entry-form-li">
@@ -642,7 +641,7 @@ export default {
                 data:{
                     portType: 1
                 }
-            }).then(function (res) {
+            }).then(function (res) {           
                 console.log(res)
                 if(res.data.code==200){
                     that.options=res.data.data.groupNameData;