Prechádzať zdrojové kódy

管理后台-演出管理-演出安排

panyong 3 rokov pred
rodič
commit
2777d5a000

+ 2 - 10
htmldev/manage/src/views/business/outlet/list/details.vue

@@ -54,15 +54,11 @@
         </el-form-item>
         <el-form-item prop="bar_song_start_time"
                       :rules="formRules.required"
-                      label="点歌开始时间:">
+                      label="点歌时间:">
           <el-time-select placeholder="起始时间"
                           v-model="form.bar_song_start_time"
                           :picker-options="{start: '00:00', step: '00:05', end: '23:59'}">
           </el-time-select>
-        </el-form-item>
-        <el-form-item prop="bar_song_end_time"
-                      :rules="formRules.required"
-                      label="点歌结束时间:">
           <el-time-select placeholder="结束时间"
                           v-model="form.bar_song_end_time"
                           :picker-options="{start: '00:00', step: '00:05', end: '23:59', minTime: form.bar_song_start_time}">
@@ -70,15 +66,11 @@
         </el-form-item>
         <el-form-item prop="bar_place_reserve_start_time"
                       :rules="formRules.required"
-                      label="座位预定开始时间:">
+                      label="座位预定时间:">
           <el-time-select placeholder="起始时间"
                           v-model="form.bar_place_reserve_start_time"
                           :picker-options="{start: '00:00', step: '00:05', end: '23:59'}">
           </el-time-select>
-        </el-form-item>
-        <el-form-item prop="bar_place_reserve_end_time"
-                      :rules="formRules.required"
-                      label="座位预定结束时间:">
           <el-time-select placeholder="结束时间"
                           v-model="form.bar_place_reserve_end_time"
                           :picker-options="{start: '00:00', step: '00:05', end: '23:59', minTime: form.bar_place_reserve_start_time}">

+ 2 - 4
htmldev/manage/src/views/business/place/list/details.vue

@@ -83,9 +83,7 @@
             </el-input>
           </el-col>
         </el-form-item>
-        <el-form-item>
-          <h3>桌号设置</h3>
-        </el-form-item>
+        <el-form-item label="桌号设置" required></el-form-item>
         <el-form-item v-for="(domain, index) in form.domains"
                       :label="(index + 1) + '桌'"
                       :key="domain.key"
@@ -96,12 +94,12 @@
           </el-col>
           <el-col :span="7" :offset="1">
             <el-button type="warning" size="small" @click.prevent="removeDomain(domain)">删除</el-button>
-            <el-button type="primary" size="small" @click.prevent="addDomain">新增</el-button>
           </el-col>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer text-center">
         <el-button @click="dialog = false">取 消</el-button>
+        <el-button @click.prevent="addDomain">新增桌号</el-button>
         <el-button type="primary" @click="handleSubmit">确 定</el-button>
       </div>
     </el-dialog>

+ 118 - 3
htmldev/manage/src/views/business/show/plan/index.vue

@@ -1,13 +1,128 @@
 <template>
-  <div>演出安排</div>
+  <div class="padding-20">
+    <div class="search-box">
+      <el-form ref="form" :inline="true" :model="searchForm" clearable label-width="100px" class="mt-10">
+        <el-form-item label="日期:">
+          <el-date-picker
+            v-model="value2"
+            align="right"
+            type="date"
+            placeholder="选择日期"
+            :picker-options="pickerOptions">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="部门名称:">
+          <el-input v-model="searchForm.department_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>
+        </el-form-item>
+        <el-form-item class="ml-10">
+          <el-button icon="el-icon-plus" type="primary" @click="add" v-permission="'department_list_add'">新增</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <el-table :data="tableData" stripe v-loading="tableLoading" fit class="marginT-10 order-table" border
+              :max-height="vheight">
+      <el-table-column label="ID" prop="id"></el-table-column>
+      <el-table-column label="艺人" prop="created_at"></el-table-column>
+      <el-table-column label="演唱时间" prop="department_name"></el-table-column>
+      <el-table-column label="本节点歌歌单" prop="department_desc"></el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="scope">
+          <el-button type="text" @click="edit(scope.row)" v-permission="'department_list_edit'">编辑</el-button>
+          <el-button type="text" @click="del(scope.row)" v-permission="'department_list_del'">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      class="marginT-20"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :hide-on-single-page="true"
+      :current-page="page"
+      :page-size="page_size"
+      :page-sizes="[10, 20, 100, 200, 300, 400]"
+      background
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="totalCount"/>
+    <detail v-if="detailsDialog.show" v-model="detailsDialog.show" :exData="detailsDialog.exData"
+            @success="init"></detail>
+  </div>
 </template>
 
 <script>
+import page from '@/mixin/page'
+import detail from './details'
+
 export default {
-  name: 'index'
+  mixins: [page],
+  components: {
+    detail,
+  },
+  data () {
+    return {
+      pickerOptions: {
+        shortcuts: [{
+          text: '今天',
+          onClick (picker) {
+            picker.$emit('pick', new Date())
+          }
+        }, {
+          text: '昨天',
+          onClick (picker) {
+            const date = new Date()
+            date.setTime(date.getTime() - 3600 * 1000 * 24)
+            picker.$emit('pick', date)
+          }
+        }, {
+          text: '一周前',
+          onClick (picker) {
+            const date = new Date()
+            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', date)
+          }
+        }]
+      },
+      value2: new Date(),
+      detailsDialog: {
+        show: false,
+        exData: {}
+      },
+      time: [],
+      searchForm: {},
+      tableData: [],
+      tableUrl: '/department/list'
+    }
+  },
+  methods: {
+    add () {
+      this.detailsDialog.exData = {}
+      this.detailsDialog.show = true
+    },
+    edit (row) {
+      this.detailsDialog.exData = row
+      this.detailsDialog.show = true
+    },
+    del (row) {
+      this.$confirm('确定要删除吗', '确认', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const data = await this.$fetch('/api/auth/department/del', { id: row.id })
+        if (data.code == 200) {
+          this.$message.success('删除成功')
+          this.init()
+        }
+      }).catch(() => {})
+    }
+  },
+  mounted () {
+    this.init()
+  },
 }
 </script>
 
 <style lang="scss" scoped>
-
 </style>