浏览代码

Merge branch 'opt_xuexiaojiaofei' into ol_12_30

wolyshaw 4 年之前
父节点
当前提交
b69fc78638

+ 4 - 86
README.md

@@ -1,89 +1,7 @@
-# vue-admin-template
+### dy-admin-manager
 
-English | [简体中文](./README-zh.md)
+#### 项目简介
 
-> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint
+本项目为管理后台系统。
 
-**Live demo:** http://panjiachen.github.io/vue-admin-template
-
-
-**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**
-
-## Build Setup
-
-
-```bash
-# clone the project
-git clone https://github.com/PanJiaChen/vue-admin-template.git
-
-# enter the project directory
-cd vue-admin-template
-
-# install dependency
-npm install
-
-# develop
-npm run dev
-```
-
-This will automatically open http://localhost:9528
-
-## Build
-
-```bash
-# build for test environment
-npm run build:stage
-
-# build for production environment
-npm run build:prod
-```
-
-## Advanced
-
-```bash
-# preview the release environment effect
-npm run preview
-
-# preview the release environment effect + static resource analysis
-npm run preview -- --report
-
-# code format check
-npm run lint
-
-# code format check and auto fix
-npm run lint -- --fix
-```
-
-Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
-
-## Demo
-
-![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)
-
-## Extra
-
-If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
-
-For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
-
-## Related Project
-
-[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
-
-[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
-
-[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)
-
-## Browsers support
-
-Modern browsers and Internet Explorer 10+.
-
-| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
-| --------- | --------- | --------- | --------- |
-| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
-
-## License
-
-[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
-
-Copyright (c) 2017-present PanJiaChen
+主要使用 [Vue 2.X](https://cn.vuejs.org/v2/guide/)、[Element UI](https://element.eleme.io/#/zh-CN/component/installation),进行封装

+ 15 - 0
src/components/empty/README.md

@@ -0,0 +1,15 @@
+#### empty 空状态
+
+##### demo
+
+###### 默认
+``` html
+<empty/>
+```
+
+###### 自定义描述
+``` html
+<empty>
+  <p>自定义描述</p>
+</empty>
+```

+ 1 - 0
src/components/empty/empty.svg

@@ -0,0 +1 @@
+<svg t="1609119920930" class="icon" viewBox="0 0 1706 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10437" width="256" height="256"><path d="M0 851.446623a853.285929 172.553377 0 1 0 1706.571857 0 853.285929 172.553377 0 1 0-1706.571857 0Z" fill="#ECEEF2" p-id="10438"></path><path d="M304.149029 857.135196a92.534118 92.534118 0 0 1-91.775642-92.913356L151.316038 301.361628a27.494769 27.494769 0 0 1 9.480955-21.426958L439.726682 6.883173a27.874007 27.874007 0 0 1 18.961909-6.826287h793.555914a27.30515 27.30515 0 0 1 18.961909 6.067811l277.602356 273.620354a34.131437 34.131437 0 0 1 9.670574 21.806196l-61.057349 462.670593a92.534118 92.534118 0 0 1-91.775642 92.913356z" fill="#E1E5EC" p-id="10439"></path><path d="M242.143585 764.22184a61.815825 61.815825 0 0 0 62.005444 62.005444h1099.790752a60.298872 60.298872 0 0 0 60.678111-61.057349l61.057348-452.241542H1076.467604l-2.844287 18.961909a223.371294 223.371294 0 0 1-66.177064 126.096699 217.87234 217.87234 0 0 1-150.178323 60.867729 221.285484 221.285484 0 0 1-216.924245-187.343666l-3.033906-18.961909H180.32776z" fill="#F4F5F7" p-id="10440"></path><path d="M202.133956 282.02048h447.121826a11.377146 11.377146 0 0 1 9.860193 11.187527 197.203859 197.203859 0 1 0 394.407718 0 10.618669 10.618669 0 0 1 10.049812-11.187527h442.570968L1251.675648 29.827084h-792.607818z" fill="#FFFFFF" p-id="10441"></path><path d="M1117.994186 338.147733l378.290095-0.568858-56.316872 405.974483-38.871914-0.948095 53.662204-371.08457-342.831325 1.327334z" fill="#FFFFFF" p-id="10442"></path></svg>

+ 32 - 0
src/components/empty/index.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="empty">
+    <img src="./empty.svg"/>
+    <slot v-if="$slots.default"/>
+    <p v-else>{{desc}}</p>
+  </div>
+</template>
+<script>
+import tempalteManager from '@/views/categroyManager/specialSetup/tempalteManager.vue'
+export default {
+  components: { tempalteManager },
+  name: 'empty',
+  props: {
+    desc: {
+      type: String,
+      default: '暂无数据'
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .empty{
+    text-align: center;
+    >img {
+      width: 100px;
+    }
+    >p{
+      font-size: 16px;
+      line-height: 1.8;
+    }
+  }
+</style>

+ 2 - 0
src/components/install.js

@@ -13,6 +13,7 @@ import statistic from '@/components/statistic'
 import descriptions from '@/components/Descriptions/Descriptions.vue'
 import remoteSearch from "@/components/remote-search"
 import tabRouter from '@/components/tab-router'
+import empty from '@/components/empty'
 
 export default {
   install(Vue) {
@@ -26,5 +27,6 @@ export default {
     Vue.component(descriptions.name, descriptions)
     Vue.component(remoteSearch.name, remoteSearch)
     Vue.component(tabRouter.name, tabRouter)
+    Vue.component(empty.name, empty)
   }
 }

+ 5 - 0
src/constant/index.js

@@ -190,3 +190,8 @@ export const mergeType = {
   合并课: '合并课',
   被合并课: '被合并课',
 }
+
+export const belongDaya = {
+  0: '奖金',
+  1: '工资'
+}

+ 18 - 0
src/views/operateManager/serverIndexList.vue

@@ -160,6 +160,14 @@
           <el-table-column align="center"
                            prop="educationalTeacherName"
                            label="乐团主管"></el-table-column>
+          <el-table-column align="center"
+                           prop="courseIds"
+                           width="100"
+                           label="服务课程">
+                           <template slot-scope="scope">
+                              <copy-text>{{scope.row.courseIds || '课外训练'}}</copy-text>
+                            </template>
+          </el-table-column>
           <!-- <el-table-column align="center" label="当前有VIP课" width="100" >
             <template slot-scope="scope">
               <div>{{scope.row.existVipCourse?'是':'否'}}</div>
@@ -237,6 +245,14 @@
             </template>
           </el-table-column>
           <el-table-column align="center"
+                           width="120"
+                           label="服务周期">
+            <template slot-scope="scope">
+              <div>{{dayjs(scope.row.monday).format('YYYY-MM-DD')}}</div>
+              <div>{{dayjs(scope.row.sunday).format('YYYY-MM-DD')}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center"
                            label="操作">
             <!--  -->
             <template slot-scope="scope">
@@ -262,6 +278,7 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
+import dayjs from 'dayjs'
 import { getEmployeeOrgan, getTeacher } from "@/api/buildTeam";
 import { findStudentExtracurricularExercisesSituations } from "@/api/afterSchool";
 // findStudentExtracurricularExercisesSituations
@@ -329,6 +346,7 @@ export default {
     this.init();
   },
   methods: {
+    dayjs,
     init () {
       if (this.$route.query.teacherId) {
         this.searchForm.teacherId = this.$route.query.teacherId * 1;

+ 1 - 2
src/views/resetTeaming/components/resetPayList.vue

@@ -368,8 +368,7 @@
       <subject-preview :subjectId="dialogSubjectId"
                        :calenderId="dialogCalenderId"></subject-preview>
       <div slot="footer">
-        <el-button type="primary"
-                   @click="previewVisible = false">确 定</el-button>
+        <el-button @click="previewVisible = false">确 定</el-button>
       </div>
     </el-dialog>
   </div>

+ 2 - 2
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -174,14 +174,14 @@
         >
           新增学员
         </div> -->
-        <!-- <div
+        <div
           class="newBand"
           @click="delStudentBtn"
           v-if="info.paymentStatus == 'NO'"
           v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
         >
           删除学员
-        </div> -->
+        </div>
         <div class="newBand"
              v-permission="'export/musicGroupPaymentCalenderDetail'"
              @click="onMusicGroupPaymentCalenderDetail">

+ 1 - 1
src/views/resetTeaming/modals/pay-items.vue

@@ -130,7 +130,7 @@
             >
             <el-button
               type="text"
-              v-if="$listeners.onPreview && payUserType === 'STUDENT'"
+              v-if="$listeners.onPreview && payUserType === 'STUDENT' && scope.row.paymentType == 'MUSIC_APPLY'"
               v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
               @click="$listeners.onPreview(scope.row)"
               >预览</el-button

+ 2 - 2
src/views/resetTeaming/modals/school-pay-user-list.vue

@@ -41,7 +41,7 @@
       @selection-change="handleSelectionChange"
       :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
     >
-      <el-table-column type="selection" width="55"> </el-table-column>
+      <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
       <el-table-column
         align="center"
         prop="userId"
@@ -181,7 +181,7 @@ export default {
           type: 'warning'
         })
         await delMusicGroupPaymentCalenderStudent({
-          musicGroupPaymentCalenderIds: this.activeChiose.map(item => item.id)
+          musicGroupPaymentCalenderDetailIds: this.activeChiose.map(item => item.id).join(',')
         })
         this.$message.success('删除成功')
         this.FetchList()

+ 1 - 0
src/views/resetTeaming/modals/subject-preview.vue

@@ -497,6 +497,7 @@ export default {
 <style lang="less" scoped>
 
 .noticeInfo {
+  line-height: 1.8;
     h2 {
         font-size: 18px;
         color: #1a1a1a;

+ 9 - 0
src/views/teamDetail/api.js

@@ -14,3 +14,12 @@ export const updateClassGroupStudents = data => request2({
   method: 'post',
   requestType: 'form'
 })
+
+// 查询可排课信息
+export const queryStudentSubTotalCourseTimes = data => request2({
+  url: '/api-web/studentManage/queryStudentSubTotalCourseTimes',
+  params: data,
+  method: 'get',
+  requestType: 'form'
+})
+

+ 49 - 0
src/views/teamDetail/components/modals/course-time-detail.vue

@@ -0,0 +1,49 @@
+<template>
+  <el-table
+    :data="list"
+    :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+  >
+    <el-table-column
+      prop="type"
+      label="课程类型"
+      align="center"
+    >
+      <template slot-scope="scope">
+        {{courseType[scope.row.type]}}
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="time"
+      label="剩余时长(分)"
+      align="center"
+    />
+  </el-table>
+</template>
+
+<script>
+import { queryStudentSubTotalCourseTimes } from '../../api'
+import { courseType } from '@/constant'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      courseType,
+      list: []
+    }
+  },
+  mounted() {
+    this.FetchDetail()
+  },
+  methods: {
+    async FetchDetail() {
+      try {
+        const res = await queryStudentSubTotalCourseTimes({
+          userId: this.detail.userId,
+          musicGroupId: this.detail.musicGroupId,
+        })
+        this.list = Object.keys(res.data).map(item => ({type: item, time: res.data[item]}))
+      } catch (error) {}
+    }
+  }
+}
+</script>

+ 30 - 174
src/views/teamDetail/components/studentList.vue

@@ -138,6 +138,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="phone"
+                         width="120"
                          label="联系电话"></el-table-column>
         <!-- <el-table-column align='center'
         prop=""
@@ -187,6 +188,11 @@
                          label="缴费金额"
                          prop="courseFee"></el-table-column> -->
         <el-table-column align="center"
+                         prop="subTotalCourseTime"
+                         label="剩余时长(分)"
+                         width="125">
+                         </el-table-column>
+        <el-table-column align="center"
                          label="报名缴费">
           <template slot-scope="scope">
             <div>{{ scope.row.paymentStatus | studentPays}}</div>
@@ -208,11 +214,13 @@
         </el-table-column>
         <el-table-column align="center"
                          fixed="right"
-                         width="300px;"
+                         width="340px;"
                          label="操作">
           <template slot-scope="scope">
             <div>
-
+              <el-button type="text"
+                         v-if="permission('studentManage/queryStudentSubTotalCourseTimes')"
+                         @click="viewTimer(scope.row)">课程时长</el-button>
               <el-button type="text"
                          v-if="permission('studentManage/queryStudentClassGroup')&&scope.row.studentStatus != 'QUIT'"
                          @click="lookClass(scope.row)">查看班级</el-button>
@@ -348,177 +356,6 @@
                             placeholder="选择日期"></el-date-picker>
           </el-col>
         </el-form-item>
-        <!-- <br />
-        <el-form-item label="声部班">
-          <el-select v-model.trim="maskForm.signClass"
-                     filterable
-                     clearable>
-            <el-option v-for="(item,index) in signList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item> -->
-        <!-- <el-form-item label="合奏班">
-          <el-select v-model.trim="maskForm.mixClass"
-                     filterable
-                     clearable>
-            <el-option v-for="(item,index) in mixList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item> -->
-        <!-- <el-form-item label="基础技能班">
-          <el-select v-model.trim="maskForm.highClass"
-                     filterable
-                     clearable>
-            <el-option v-for="(item,index) in highList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item> -->
-        <!-- <el-form-item label="临时班">
-          <el-select v-model.trim="maskForm.snapClass"
-                     filterable
-                     clearable
-                     multiple>
-            <el-option v-for="(item,index) in snapList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item> -->
-        <!-- <el-form-item label="线上基础技能班">
-          <el-select v-model.trim="maskForm.highonline"
-                     filterable
-                     clearable
-                     multiple>
-            <el-option v-for="(item,index) in highonlineList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item>-->
-        <!-- <el-form-item label="乐团网管课">
-          <el-select v-model.trim="maskForm.muiscnetwork"
-                     filterable
-                     clearable
-                     multiple>
-            <el-option v-for="(item,index) in muiscnetworkList"
-                       :key="index"
-                       :value="item.id"
-                       :label="item.name"></el-option>
-          </el-select>
-        </el-form-item>-->
-
-        <!-- <el-divider>首缴订单信息</el-divider>
-        <el-form-item label="课程费用"
-                      prop="temporaryCourseFee">
-          <el-input type="number"
-                    @mousewheel.native.prevent
-                    v-model.trim="maskForm.temporaryCourseFee"
-                    placeholder="首缴课程金额"></el-input>
-        </el-form-item>
-
-        <el-form-item label="乐器"
-                      class="instrList">
-          <el-col :span="11"
-                  style="width: auto;">
-            <el-form-item>
-              <el-select placeholder="选择乐器"
-                         filterable
-                         clearable
-                         @change="onInstrumentChange"
-                         v-model.trim="maskForm.musicGoodsIdList">
-                <el-option v-for="(item, index) in INSTRUMENTLIST"
-                           :key="index"
-                           :value="item.value"
-                           :label="item.label"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="1">&nbsp;</el-col>
-          <el-col :span="11">
-            <el-form-item>
-              <el-input type="number"
-                        @mousewheel.native.prevent
-                        :disabled="kitStatus"
-                        v-model.trim="maskForm.musicPrice"
-                        placeholder="输入金额">
-                <el-select v-model.trim="maskForm.kitGroupPurchaseType"
-                           style="width: 80px !important;"
-                           @change="onKitGroupChnage"
-                           slot="prepend">
-                  <el-option label="免费"
-                             value="FREE"></el-option>
-                  <el-option label="团购"
-                             value="GROUP"></el-option>
-                  <el-option label="租赁"
-                             value="LEASE"></el-option>
-                </el-select>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-form-item>
-        <el-form-item label="辅件">
-          <el-col :span="11"
-                  style="width: auto;">
-            <el-form-item>
-              <el-select filterable
-                         clearable
-                         multiple
-                         placeholder="选择辅件"
-                         v-model.trim="maskForm.instrGoodsIdList">
-                <el-option v-for="(item, index) in ACCESSORIESLIST"
-                           :key="index"
-                           :value="item.value"
-                           :label="item.label"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="1">&nbsp;</el-col>
-          <el-col :span="11">
-            <el-form-item>
-              <el-input v-model.trim="maskForm.instrPrice"
-                        placeholder="输入金额"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-form-item> -->
-        <!-- <el-alert
-          title="缴费周期设置"
-          :closable="false"
-          class="alert"
-          type="info">
-        </el-alert>
-        <el-collapse :value="collapse" @change="collapseChange" >
-          <el-collapse-item
-            v-for="(item, index) in cycles"
-            :key="index"
-            :name="index"
-          >
-            <template slot="title">
-              <div class="collapse-title">
-                <span>缴费周期 {{index + 1}}</span>
-                <i v-if="cycles.length > 1" class="el-icon-circle-close" @click.stop="removeCycle(index)"></i>
-              </div>
-            </template>
-            <paymentCycle
-              ref="cycles"
-              className="cycleForm"
-              :form="item"
-            />
-          </el-collapse-item>
-        </el-collapse>
-        <el-button
-          icon="el-icon-circle-plus-outline"
-          plain
-          type="info"
-          size="small"
-          style="width: 100%;margin: 20px 0;"
-          @click="addCycle"
-        >新增缴费周期</el-button> -->
       </el-form>
       <div slot="footer"
            class="dialog-footer">
@@ -591,6 +428,17 @@
            v-if="codeUrl">{{ codeUrl }}</p>
       </div>
     </el-dialog>
+    <el-dialog
+      :visible.sync="timesVisible"
+      title="查看剩余可排课时长"
+      width="500px"
+    >
+      <times-view
+        :detail="timerDetail"
+        v-if="timesVisible"
+        @close="timesVisible = false"
+      />
+    </el-dialog>
     <el-dialog title="修改缴费周期"
                :before-close="closePayVisible"
                width="600px"
@@ -751,6 +599,7 @@ import { permission } from "@/utils/directivePage";
 import { addVisit } from "@/views/returnVisitManager/api.js"
 import cleanDeep from 'clean-deep'
 import createUserPay from './modals/create-user-pay.vue'
+import TimesView from './modals/course-time-detail'
 import paymentCycle from '../../resetTeaming/modals/payment-cycle'
 import Tooltip from '@/components/Tooltip/index'
 export default {
@@ -762,6 +611,8 @@ export default {
       quitVisible: false, // 退团信息确认的弹窗
       studentClassVisible: false, // 学员所在班级弹窗
       addStudentVisible: false, //新增学员弹窗
+      timesVisible: false,
+      timerDetail: null,
       teamid: '',
       topFrom: {
         // 顶部的禁选框集合
@@ -918,7 +769,8 @@ export default {
     pagination,
     paymentCycle,
     createUserPay,
-    Tooltip
+    Tooltip,
+    'times-view': TimesView
   },
   created () {
     // 判断是否带缓存参数
@@ -957,6 +809,10 @@ export default {
     this.init();
   },
   methods: {
+    viewTimer(row) {
+      this.timerDetail = row
+      this.timesVisible = true
+    },
     permission (str) {
       return permission(str);
     },