From 4c10b44dd7d8f57934d7958d7134f2e77bbd0fa4 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期二, 06 六月 2023 16:02:29 +0800
Subject: [PATCH] 旅游详情,跳转页面都可以了,还有费用信息

---
 ruoyi-ui/src/views/travel/index.vue |  132 ++++++++++++++++++++++---------------------
 1 files changed, 68 insertions(+), 64 deletions(-)

diff --git a/ruoyi-ui/src/views/travel/index.vue b/ruoyi-ui/src/views/travel/index.vue
index 24e9536..b7510ee 100644
--- a/ruoyi-ui/src/views/travel/index.vue
+++ b/ruoyi-ui/src/views/travel/index.vue
@@ -1,7 +1,7 @@
 <template>
     <div class="app-container" style="opacity: 1;">
       <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-  
+
         <el-form-item label="鏃堕棿" >
           <el-date-picker
             v-model="dateRange"
@@ -28,7 +28,7 @@
           <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">閲嶇疆</el-button>
         </el-form-item>
       </el-form>
-  
+
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button
@@ -40,7 +40,7 @@
             v-hasPermi="['system:role:add']"
           >鏂板</el-button>
         </el-col>
-  
+
         <el-col :span="1.5">
           <el-button
             type="danger"
@@ -82,7 +82,7 @@
             <el-button size="mini"   type="primary"
                        plain
                        icon="el-icon-plus" >瀵煎叆</el-button>
-  
+
           </el-upload>
         </el-col>
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -92,7 +92,7 @@
       <el-table v-loading="loading" :data="travelpriceList"  @selection-change="handleSelectionChange" @row-click="handleShow" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
         <el-table-column type="selection" width="55"  align="center" />
         <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
-  
+
         <el-table-column label="璧�" prop="startTime" sortable width="100" align="center">
           <template slot-scope="scope">{{scope.row.startTime? scope.row.startTime: '鈥斺�斺�斺��'}}</template>
         </el-table-column>
@@ -101,7 +101,7 @@
         </el-table-column>
         <el-table-column label="鎬诲ぉ鏁�" prop="totalDay" sortable width="100" />
         <el-table-column label="鏍囬" prop="title" sortable width="100" />
-        
+
         <el-table-column label="鎬婚噾棰�" prop="totalCost" sortable width="100" />
         <el-table-column label="椁愯垂" prop="eat" sortable width="100" />
         <el-table-column label="浣忓" prop="stay" sortable width="100" />
@@ -109,7 +109,7 @@
         <el-table-column label="闂ㄧエ" prop="entrance" sortable width="100" />
         <el-table-column label="璐墿" prop="shopping" sortable width="100" />
 
-        
+
         <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope" v-if="scope.row.roleId !== 1">
             <el-button
@@ -135,7 +135,7 @@
 
       <el-dialog :title="title" :visible.sync="openDataScope" width="1500px" append-to-body >
        <div style="background-color: #FEF7FC;">
-        <el-table v-loading="loading" :data="travelpriceList[detailList]" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"  >
+        <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"  >
           <el-table-column type="selection" width="55"  align="center" />
           <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
           <el-table-column label="鏃堕棿" prop="happenTime" sortable width="100" align="center">
@@ -165,7 +165,7 @@
                 v-hasPermi="['system:role:remove']"
               >鍒犻櫎</el-button>
             </template>
-          </el-table-column>  
+          </el-table-column>
         </el-table>
         <pagination
           v-show="total>0"
@@ -178,7 +178,7 @@
       </div>
 
     </el-dialog>
-             
+
       <pagination
         v-show="total>0"
         :total="total"
@@ -187,7 +187,7 @@
         @pagination="getList"
         style="background: #FEF7FC;"
       />
-  
+
       <!-- 娣诲姞鎴栦慨鏀硅祫浜т俊鎭厤缃璇濇 -->
 
       <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
@@ -195,7 +195,7 @@
           <el-form-item label="鍙拌处" prop="type">
             <el-input v-model="formDat.type" placeholder="璇疯緭鍏ュ唴瀹�" clearable :style="{width: '100%'}" ></el-input>
           </el-form-item>
-  
+
           <el-form-item label="鏃堕棿" prop="happenTime">
             <el-date-picker
               v-model='formDat.happenTime'
@@ -228,7 +228,7 @@
           <el-form-item label="澶囨敞" prop="remark">
             <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input>
           </el-form-item>
-  
+
           <h4 class="form-header">鐩稿叧鍥剧墖 </h4>
           <el-upload
             action="#"
@@ -254,7 +254,7 @@
             >
               <i class="el-icon-zoom-in"></i>
             </span>
-  
+
             <span
               v-if="!disabled"
               class="el-upload-list__item-delete"
@@ -263,8 +263,8 @@
               <i class="el-icon-delete"></i>
             </span>
           </span>
-  
-  
+
+
             </div>
           </el-upload>
           <h4 class="form-header">鍏朵粬闄勪欢 </h4>
@@ -273,7 +273,7 @@
             :file-list="fileListOther"
             class="upload-demo"
             multiple
-  
+
             :on-remove="handleRemove"
             :http-request="requestUpload"
             :show-file-list="true"
@@ -284,29 +284,29 @@
               </div>
             </template>
           </el-upload>
-  
+
         </el-form>
         <h4 class="form-header"> </h4>
-  
+
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="submitDataScope">纭� 瀹�</el-button>
           <el-button @click="cancelData">鍙� 娑�</el-button>
         </div>
       </el-dialog>
-  
+
 
     </div>
   </template>
-  
+
   <script>
   import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
   import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
-  
-  
-  
+
+
+
   //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁�  --鎺ュソ浜�
   import {listTravelPrice,enload,delTravelPrice, addTravelPrice, uploadPic} from "@/api/travel/index";
-  
+
   export default {
     name: "Role",
     dicts: ['sys_normal_disable'],
@@ -346,7 +346,7 @@
         fileList:[
         ],
         fileListOther:[
-  
+
         ],
         dsb:true,
         btn:false,
@@ -372,7 +372,7 @@
           useFor:undefined,
           usePeople:undefined,
           createTime:undefined,
-  
+
         },
         // 琛ㄥ崟鍙傛暟
         form: {},
@@ -387,7 +387,7 @@
             message: '璇疯緭鍏ヤ娇鐢ㄤ汉',
             trigger: 'blur'
           }],
-  
+
           useFor: [{
             required: true,
             message: '璇疯緭鍏ョ敤閫�',
@@ -442,10 +442,10 @@
     },
     created() {
       this.getList();
-  
+
     },
     methods: {
-  
+
       //鍩洪噾/鍙拌处鐨勯�夋嫨
       getSrc1(type) {
         if (type === 0) {
@@ -454,7 +454,7 @@
           return '鍙拌处'
         }
       },
-  
+
       getSrc2(kind) {
         if (kind == 0) {
           return '鐜伴噾'
@@ -462,13 +462,13 @@
           return '鑷姩鎵e垝'
         }
       },
-  
+
       // 鍙栨秷鎸夐挳
       cancelData() {
         this.open = false;
         this.reset();
       },
-  
+
       //闅旇鍙樿壊
       tableRowClassName({ row, rowIndex }) {
         if (rowIndex % 2 == 0) {
@@ -477,23 +477,23 @@
           return "statistics-warning-row";
         }
       },
-  
+
       /** 鏌ヨ瑙掕壊鍒楄〃 */
       //鍒楄〃鏄剧ず瀹跺ぇ浜嬭
-  
-  
+
+
       getList() {
         this.loading = true;
         this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
         this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
         // console.log(this.queryParams)
         //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-  
+
           listTravelPrice(this.queryParams).then(response => {
             //  alert(123)
             //   console.log(response.data)
             this.travelpriceList = response.data.data;
-            
+            console.log(this.travelpriceList[0])
             this.total = response.data.total;
             this.loading = false;
           }
@@ -562,49 +562,54 @@
         this.single = selection.length!=1
         this.multiple = !selection.length
       },
-  
+
       /** 鏂板鎸夐挳鎿嶄綔 */
       handleAdd() {
         this.reset();
         this.open = true;
         this.title = "娣诲姞瀹跺涵鏀舵敮鍙拌处";
       },
-  
+
       //  寮圭獥
       handleShow(row){
       const id = row.id;
       this.openDataScope = true
-      this.getList()
+   //   this.getList()
+      //alert(123)
+      this.detailList = row.detailList
+      // alert(row.index)
       this.title = "灞曠ず璇︽儏";
-      
+
      },
-    
+
       /** 鏌ョ湅璇︾粏淇℃伅 */
       handleCheck(row){
         const id = row.id;
+       // alert(id)
+      //  alert(row.fee_id)
         this.$router.push("/self/travel/Info/" + id);
       },
       /** 淇敼鎸夐挳鎿嶄綔 */
       handleUpdate(row) {
         const id = row.id;
         let jd = true
-  
+
         this.$router.push({
-          path:"/self/travel/Info/" + id,
+          path:"/self/travel/edit/" + id,
           query:{
             detail:jd
           }
         });
       },
-  
-  
+
+
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
       /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
       submitDataScope: function() {
-  
+
         let ul = this.fileList.map(function (elem){
           return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
         }).join(",")
@@ -614,7 +619,7 @@
         this.formDat.url = ul+","+uls
         this.$refs["elForm"].validate(valid => {
           if (valid) {
-  
+
             addEconomy(this.formDat).then(response => {
               this.$modal.msgSuccess("鏂板鎴愬姛");
               this.open = false;
@@ -629,22 +634,22 @@
         var formData = new FormData();
         formData.append('uploadFile', file);
         let _this = this
-  
+
         uploadPic(formData).then(response => {
           let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
-  
+
           if(_this.fot.includes(pth) === true)
           {
             _this.fileList.push({name:response.data.fileName, "url":response.data.url})
-  
+
           }
-  
+
           else{
             _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
-  
+
           }
         })
-  
+
       },
       /** 鍒犻櫎鎸夐挳鎿嶄綔 */
       handleDelete(row) {
@@ -659,7 +664,7 @@
       /** 瀵煎嚭鎸夐挳鎿嶄綔 */
       handleExport() {
         const Ids = this.ids;
-  
+
         if(Ids.length==0)
         {
         this.download('/zfEconomy/export', {
@@ -674,7 +679,7 @@
     ,
     handleExportTemplate(){
         this.download('/zfEconomy/model', {
-  
+
         }, `zfEconomy_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
@@ -687,27 +692,26 @@
       enload(formData).then(response => {
         _this.getList();
         Message({ message: "瀵煎叆鎴愬姛", type: 'warning' })
-  
+
       }).catch(err)
       {
         Message({ message: "瀵煎叆澶辫触", type: 'error' })
       }
-  
+
     }
     },
   };
- 
+
 
   </script>
-  
+
   <style>
   .el-table__row.statistics-warning-row {
     background: #E0EEFE;
-  
+
   }
   .el-table__row.statistics-warning-row1 {
     background: #FFEFF2;
-  
+
   }
   </style>
-  
\ No newline at end of file

--
Gitblit v1.9.1