From 188d4a764d8bcedf53ac67127b4b9e142f79b1eb Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期日, 27 八月 2023 21:30:07 +0800
Subject: [PATCH] 旅游完善

---
 ruoyi-ui/src/views/travel/index.vue |  303 +++++++++++++++++++-------------------------------
 1 files changed, 116 insertions(+), 187 deletions(-)

diff --git a/ruoyi-ui/src/views/travel/index.vue b/ruoyi-ui/src/views/travel/index.vue
index 8dd1d80..ed2e305 100644
--- a/ruoyi-ui/src/views/travel/index.vue
+++ b/ruoyi-ui/src/views/travel/index.vue
@@ -2,7 +2,7 @@
   <div class="app-container" style="opacity: 1;">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <h1 style="font-size:21px">瀹岀編鏃呴��</h1>
-      <el-form-item label="鏃堕棿" prop="startTime">
+      <el-form-item label="鏃堕棿" prop="startTime" >
         <el-date-picker
           v-model="dateRange"
           style="width: 240px;"
@@ -91,10 +91,7 @@
     <!-- 杩欓噷鏈変釜familyList鏁扮粍 鏄湪data()涓畾涔夌殑 -->
     <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 fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="40"/>
-      <el-table-column label="鏃呮父鍚嶇О" prop="tableName" sortable width="100" />
-      <el-table-column label="鏍囬" prop="title" sortable width="100" />
-      <el-table-column label="鍘诲悜" prop="destination" sortable width="50" />
+      <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60px"/>
       <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>
@@ -102,7 +99,9 @@
         <template slot-scope="scope">{{scope.row.endTime? scope.row.endTime: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
       <el-table-column label="鎬诲ぉ鏁�" prop="totalDay" sortable width="100" />
-
+      <el-table-column label="鏃呮父鍚嶇О" prop="tableName" sortable width="100" />
+      <el-table-column label="鏍囬" prop="title" sortable width="130px" />
+      <el-table-column label="鍘诲悜" prop="destination" sortable width="80px" />
       <el-table-column label="鏃呮父鎬ц川" prop="property" sortable width="100" />
       <el-table-column label="鏃呮父鏂瑰紡" prop="type" sortable width="100" />
       <el-table-column label="鎬婚噾棰�" prop="totalCost" sortable width="100" />
@@ -115,14 +114,14 @@
 
       <el-table-column label="鎿嶄綔" align="center" sortable width="200" >
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
-
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['familymodel:economy:info']"
+            v-hasPermi="['person:travel:edit']"
           >淇敼</el-button>
+
           <el-button
             size="mini"
             type="text"
@@ -133,41 +132,55 @@
           <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:economy:info']">
             <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
           </el-dropdown>
-          <el-button class="button" size="mini" type="text"  @click="handleShow"  v-hasPermi="['system:role:add']">
-            <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> </el-button>
+          <!-- <el-button class="button" size="mini" type="text"  @click="handleShow"  v-hasPermi="['system:role:add']">
+            <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> </el-button> -->
         </template>
       </el-table-column>
     </el-table>
+    <div style="background-color: #FEF7FC;">
+      <el-dialog :title="title" :visible.sync="openDataScope" width="1300px" append-to-body >
+        <div style="background-color: #FEF7FC;">
+          <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"  >
+            <el-table-column type="selection" width="50"  align="center" />
+            <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/>
+            <el-table-column label="鏃堕棿" prop="happenTime" sortable width="150" align="center">
+              <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template>
+            </el-table-column>
+            <el-table-column label="鍐呭" prop="content" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="鎬婚噾棰�" prop="totalCost" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="椁愯垂" prop="eat" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="浣忓" prop="stay" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="浜ら��" prop="traffic" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="闂ㄧエ" prop="entrance" sortable :show-overflow-tooltip="true" width="100px" />
+            <el-table-column label="璐墿" prop="shopping" sortable :show-overflow-tooltip="true" width="100px" />
 
-    <el-dialog :title="title" :visible.sync="openDataScope" width="1500px" append-to-body >
-      <div style="background-color: #FEF7FC;">
-        <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"  >
-          <el-table-column type="selection" width="50"  align="center" />
-          <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="150"/>
-          <el-table-column label="鏃堕棿" prop="happenTime" sortable width="150" align="center">
-            <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template>
-          </el-table-column>
-          <el-table-column label="鍐呭" prop="content" sortable :show-overflow-tooltip="true" width="160" />
-          <el-table-column label="鎬婚噾棰�" prop="totalCost" sortable :show-overflow-tooltip="true" width="160" />
-          <el-table-column label="椁愯垂" prop="eat" sortable :show-overflow-tooltip="true" width="160" />
-          <el-table-column label="浣忓" prop="stay" sortable :show-overflow-tooltip="true" width="160" />
-          <el-table-column label="浜ら��" prop="traffic" sortable :show-overflow-tooltip="true" width="150" />
-          <el-table-column label="闂ㄧエ" prop="entrance" sortable :show-overflow-tooltip="true" width="150" />
-          <el-table-column label="璐墿" prop="shopping" sortable :show-overflow-tooltip="true" width="150" />
+            <el-table-column label="鎿嶄綔" align="center" sortable class-name="small-padding fixed-width">
+              <template slot-scope="scope" v-if="scope.row.roleId !== 1">
 
-        </el-table>
-        <pagination
-          v-show="total>0"
-          :total="total"
-          :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize"
-          @pagination="getList"
-          style="background: #FEF7FC;"
-        />
-      </div>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate1(scope.row)"
+                  v-hasPermi="['familymodel:economy:info']"
+                >淇敼</el-button>
 
-    </el-dialog>
+              </template>
+            </el-table-column>
 
+          </el-table>
+          <pagination
+            v-show="total>0"
+            :total="total"
+            :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+            style="background: #FEF7FC;"
+          />
+        </div>
+
+      </el-dialog>
+    </div>
     <pagination
       v-show="total>0"
       :total="total"
@@ -181,98 +194,40 @@
 
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
-        <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-input
-            v-model='formDat.happenTime'
-            type='date'
-            placeholder='閫夋嫨鏃ユ湡'
-          ></el-input>
+        <el-form-item label="鏍囬" prop="title">
+          <el-input v-model="formDat.title" placeholder="璇疯緭鍏ユ爣棰�" clearable :style="{width: '80%'}" >
+          </el-input>
         </el-form-item>
-        <el-form-item label="鏀跺叆/鏀嚭" prop="price">
-          <el-select v-model="formDat.price" placeholder="璇烽�夋嫨鏀跺叆/鏀嚭" clearable :style="{width: '100%'}"  >
-            <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
-            ></el-option>
+        <el-form-item label="璧峰鏃堕棿" prop="startTime">
+          <el-input type="date" v-model="formDat.startTime" placeholder="璇烽�夋嫨璧峰鏃堕棿" style="width: 80%;"></el-input>
+        </el-form-item>
+        <el-form-item label="缁撴潫鏃堕棿" prop="endTime">
+          <el-input type="date" v-model="formDat.endTime" placeholder="璇烽�夋嫨缁撴潫鏃堕棿" style="width: 80%;"></el-input>
+        </el-form-item>
+        <el-form-item label="鍘诲悜" prop="destination">
+          <el-select v-model="formDat.destination" placeholder="璇烽�夋嫨鍘诲悜" clearable :style="{width: '80%'}" >
+            <el-option label="鍥藉唴" value="鍥藉唴"></el-option>
+            <el-option label="鍥藉" value="鍥藉"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="閲戦" prop="balance">
-          <el-input v-model="formDat.balance" placeholder="璇疯緭鍏ヤ綑棰�" clearable :style="{width: '100%'}" >
+        <el-form-item label="鏃呮父鍚嶇О" prop="tableName">
+          <el-input v-model="formDat.tableName" placeholder="璇疯緭鍏ユ梾娓稿悕绉�" clearable :style="{width: '80%'}" >
           </el-input>
         </el-form-item>
-        <el-form-item label="鐢ㄩ��" prop="useFor">
-          <el-input v-model="formDat.useFor" placeholder="璇疯緭鍏ョ敤閫�" clearable :style="{width: '100%'}" >
-          </el-input>
+        <el-form-item label="鏃呮父鎬ц川" prop="property">
+          <el-select v-model="formDat.property" placeholder="璇烽�夋嫨鎬ц川" clearable :style="{width: '80%'}" >
+            <el-option label="鑷垂" value="鑷垂"></el-option>
+            <el-option label="鍏垂" value="鍏垂"></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="浣跨敤浜�" prop="usePeople">
-          <el-input v-model="formDat.usePeople" placeholder="璇疯緭鍏ヤ娇鐢ㄤ汉" clearable :style="{width: '100%'}" >
-          </el-input>
+        <el-form-item label="鏃呮父鏂瑰紡" prop="type">
+          <el-select v-model="formDat.type" placeholder="璇烽�夋嫨鏃呮父鏂瑰紡" clearable :style="{width: '80%'}" >
+            <el-option label="鑷┚娓�" value="鑷┚娓�"></el-option>
+            <el-option label="璺熷洟娓�" value="璺熷洟娓�"></el-option>
+            <el-option label="鑷姪娓�" value="鑷姪娓�"></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="鏀粯鏂瑰紡" prop="kind">
-          <el-input v-model="formDat.kind" placeholder="璇疯緭鍏ユ敮浠樻柟寮�" clearable :style="{width: '100%'}" >
-          </el-input>
-        </el-form-item>
-        <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="#"
-          list-type="picture-card"
-          multiple
-          :http-request="requestUpload"
-          :file-list="fileList"
-        >
-          <i slot="default" class="el-icon-plus"></i>
-          <div slot="file" slot-scope="{file}">
-            <img
-              class="el-upload-list__item-thumbnail"
-              :src="file.url"
-              alt=""
-              style="width: 126px; height: 126px"
-              fit="cover"
-              :preview-src-list="[file.url]"
-            >
-            <span class="el-upload-list__item-actions">
-          <span
-            class="el-upload-list__item-preview"
-            @click="handlePictureCardPreview(file)"
-          >
-            <i class="el-icon-zoom-in"></i>
-          </span>
-
-          <span
-            v-if="!disabled"
-            class="el-upload-list__item-delete"
-            @click="handleRemove(file)"
-          >
-            <i class="el-icon-delete"></i>
-          </span>
-        </span>
-
-
-          </div>
-        </el-upload>
-        <h4 class="form-header">鍏朵粬闄勪欢 </h4>
-        <el-upload
-          action=""
-          :file-list="fileListOther"
-          class="upload-demo"
-          multiple
-
-          :on-remove="handleRemove"
-          :http-request="requestUpload"
-          :show-file-list="true"
-        >
-          <el-button type="primary">涓婁紶</el-button>
-          <template #tip>
-            <div class="el-upload__tip">
-            </div>
-          </template>
-        </el-upload>
 
       </el-form>
       <h4 class="form-header"> </h4>
@@ -341,12 +296,12 @@
       btn:false,
       formDat: {
         type: undefined,
-        createTime: undefined,
-        useFor: undefined,
-        usePeople: undefined,
-        kind:undefined,
-        remark: undefined,
-        url: undefined,
+        startTime: undefined,
+        title: undefined,
+        endTime: undefined,
+        property:undefined,
+        tableName: undefined,
+        destination: undefined,
         detailList:undefined,
       },
       // 鑿滃崟鍒楄〃
@@ -371,40 +326,39 @@
       },
       // 琛ㄥ崟鏍¢獙
       rules: {
-        usePeople: [{
-          required: true,
-          message: '璇疯緭鍏ヤ娇鐢ㄤ汉',
-          trigger: 'blur'
-        }],
-
-        useFor: [{
-          required: true,
-          message: '璇疯緭鍏ョ敤閫�',
-          trigger: 'blur'
-        }],
         type: [{
           required: true,
-          message: '璇疯緭鍏ュ彴璐﹀唴瀹�',
+          message: '璇疯緭鍏ユ梾娓告柟寮�',
           trigger: 'blur'
         }],
-        balance: [{
+        property: [{
           required: true,
-          message: '璇疯緭鍏ラ噾棰�',
-          trigger: 'blur'
-        }],
-        kind: [{
-          // required: true,
-          message: '璇疯緭鍏ユ敮浠樻柟寮�',
-          trigger: 'blur'
-        }],
-        createTime: [{
-          required: true,
-          message: '璇烽�夋嫨鏃ユ湡閫夋嫨',
+          message: '璇疯緭鍏ユ梾娓告�ц川',
           trigger: 'change'
         }],
-        price: [{
+        destination: [{
           required: true,
-          message: '璇烽�夋嫨浜嬮」鍐呭',
+          message: '璇烽�夋嫨鍘诲悜',
+          trigger: 'change'
+        }],
+        tableName: [{
+          required: true,
+          message: '璇疯緭鍏ユ梾娓稿悕绉�',
+          trigger: 'blur'
+        }],
+        startTime: [{
+          required: true,
+          message: '璇烽�夋嫨鏃ユ湡',
+          trigger: 'change'
+        }],
+        endTime: [{
+          required: true,
+          message: '璇烽�夋嫨鏃ユ湡',
+          trigger: 'change'
+        }],
+        title: [{
+          required: true,
+          message: '璇烽�夋嫨鏍囬',
           trigger: 'blur'
         }],
       },
@@ -434,23 +388,6 @@
 
   },
   methods: {
-
-    //鍩洪噾/鍙拌处鐨勯�夋嫨
-    getSrc1(type) {
-      if (type === 0) {
-        return '鍩洪噾'
-      }else {
-        return '鍙拌处'
-      }
-    },
-
-    getSrc2(kind) {
-      if (kind == 0) {
-        return '鐜伴噾'
-      }else  {
-        return '鑷姩鎵e垝'
-      }
-    },
 
     // 鍙栨秷鎸夐挳
     cancelData() {
@@ -556,7 +493,7 @@
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "娣诲姞瀹跺涵鏀舵敮鍙拌处";
+      this.title = "娣诲姞鏃呮父鍐呭";
     },
 
     //  寮圭獥
@@ -567,7 +504,7 @@
       //alert(123)
       this.detailList = row.detailList
       // alert(row.index)
-      this.title = "灞曠ず璇︽儏";
+      this.title = "姣忔棩璐圭敤璇︽儏";
 
     },
 
@@ -580,16 +517,11 @@
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
-      const id = row.id;
-      // let jd = true
 
-      // this.$router.push({
-      //   path:"/self/travel/edit/" + id,
-      //   query:{
-      //     detail:jd
-      //   }
-      // });
+      const id = row.id;
+      console.log(id);
       this.$router.push("/self/travel/edit/" + id);
+
     },
 
 
@@ -600,18 +532,15 @@
     /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
     submitDataScope: function() {
 
-      let ul = this.fileList.map(function (elem){
-        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-      }).join(",")
-      let uls = this.fileListOther.map(function (elem){
-        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-      }).join(",")
-      this.formDat.url = ul+","+uls
+
+      this.formDat.detailList = [];
       this.$refs["elForm"].validate(valid => {
         if (valid) {
 
-          addEconomy(this.formDat).then(response => {
+          addTravelPrice(this.formDat).then(response => {
             this.$modal.msgSuccess("鏂板鎴愬姛");
+            console.log("okk");
+            console.log(this.formDat);
             this.open = false;
             this.getList();
           });

--
Gitblit v1.9.1