Prechádzať zdrojové kódy

管理后台-预定、商品分类、曲库管理、艺人曲库设置搜索

panyong 3 rokov pred
rodič
commit
ec9c0113d9

+ 4 - 0
htmldev/manage/src/mixin/page.js

@@ -30,6 +30,10 @@ export default {
       if (this.tableData && (data.data || data.list) && code === 200) {
         this.tableData = data.data || data.list
         this.totalCount = Number(data.total)
+        if (this.tableUrl === '/v1/user/song/list') {
+          console.log(111)
+          this.user_song_name = data.user_song_name
+        }
       }
     },
     handleCurrentChange (page) {

+ 2 - 3
htmldev/manage/src/views/business/place/reserve/index.vue

@@ -7,9 +7,8 @@
         :model="searchForm"
         clearable
         class="mt-10">
-        <!--TODO 确定是输入座位模版ID查找么-->
-        <el-form-item label="座位模版ID:">
-          <el-input v-model="searchForm.place_template_id" placeholder="请输入座位模版ID" clearable></el-input>
+        <el-form-item label="座位模版名称:">
+          <el-input v-model="searchForm.place_template_name" placeholder="请输入座位模版名称" clearable></el-input>
         </el-form-item>
         <el-form-item label="预定人手机号:">
           <el-input v-model="searchForm.order_user_phone" placeholder="请输入预定人手机号" clearable></el-input>

+ 2 - 3
htmldev/manage/src/views/business/pms/category/index.vue

@@ -1,14 +1,13 @@
 <template>
   <div class="padding-20">
     <div class="search-box">
-      <!--todo 商品分类不支持搜索-->
       <el-form ref="form"
                :inline="true"
                :model="searchForm"
                clearable
                class="mt-10">
-        <el-form-item label="座位名称:">
-          <el-input v-model="searchForm.category_name" placeholder="请输入座位名称" clearable></el-input>
+        <el-form-item label="分类名称:">
+          <el-input v-model="searchForm.category_name" placeholder="请输入分类名称" clearable></el-input>
         </el-form-item>
         <el-form-item class="ml-10">
           <el-button icon="el-icon-search" type="primary" @click="searchSubmit">查询</el-button>

+ 1 - 1
htmldev/manage/src/views/business/sms/musicLib/index.vue

@@ -28,7 +28,7 @@
       <el-table-column label="操作">
         <template slot-scope="scope">
           <el-button type="text"
-                     @click="$router.push({name: 'BusinessSMSPlayList', query: {id: scope.row.id, name: encodeURIComponent(scope.row.user_name) }})">
+                     @click="$router.push({name: 'BusinessSMSPlayList', query: {id: scope.row.id }})">
             设置曲库
           </el-button>
         </template>

+ 15 - 5
htmldev/manage/src/views/business/sms/playList/index.vue

@@ -5,21 +5,23 @@
         ref="form"
         :inline="true"
         :model="searchForm"
+        :rules="formRules"
         clearable
         class="mt-10">
-        <!--TODO 用户ID查找歌曲时,建议回传用户信息-->
-        <el-form-item label="用户ID:">
+        <el-form-item label="用户ID:"
+                      prop="id"
+                      :rules="formRules.required">
           <el-input v-model="searchForm.id" placeholder="请输入用户ID" clearable></el-input>
         </el-form-item>
         <el-form-item class="ml-10">
-          <el-button icon="el-icon-search" type="primary" @click="searchSubmit">查询</el-button>
+          <el-button icon="el-icon-search" type="primary" @click="handleSearch">查询</el-button>
         </el-form-item>
         <el-form-item class="ml-10">
           <el-button icon="el-icon-plus" type="primary" @click="add">新增</el-button>
         </el-form-item>
       </el-form>
     </div>
-    <h3 class="marginT-10">{{ decodeURIComponent($route.query.name) }}的曲库</h3>
+    <h3 class="marginT-10">{{ user_song_name }}的曲库</h3>
     <el-table :data="tableData"
               stripe
               v-loading="tableLoading"
@@ -82,7 +84,8 @@ export default {
       },
       searchForm: {},
       tableData: [],
-      tableUrl: '/v1/user/song/list'
+      tableUrl: '/v1/user/song/list',
+      user_song_name: ''
     }
   },
   methods: {
@@ -106,6 +109,13 @@ export default {
           this.init()
         }
       }).catch(() => {})
+    },
+    handleSearch () {
+      this.$refs.form.validate(async valid => {
+        if (valid) {
+          this.searchSubmit()
+        }
+      })
     }
   },
   mounted () {