mo %!s(int64=5) %!d(string=hai) anos
pai
achega
89bf08cfcb

+ 89 - 0
src/api/vipSeting.js

@@ -0,0 +1,89 @@
+import request from '@/utils/request'
+import qs from 'qs'
+// 获取vip 分类列表
+export function vipGroupCategory (data) {
+  return request({
+    url: '/web-server/vipGroupCategory/queryAll',
+    method: 'get',
+    params: data
+  })
+}
+// 获取 vip循环列表
+export function getDefaultClassesCycle (data) {
+  return request({
+    url: '/web-server/vipGroupDefaultClassesCycle/queryAll',
+    method: 'get',
+    params: data,
+  })
+}
+
+// 单个添加vip课程类型
+export function addVipGroupCategory (data) {
+  return request({
+    url: '/web-server/vipGroupCategory/add',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 单个修改vip课程类型
+export function resetVipGroupCategory (data) {
+  return request({
+    url: '/web-server/vipGroupCategory/update',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+// 删除单个vip类型
+export function removeVipGroupCategory (data) {
+  return request({
+    url: '/web-server/vipGroupCategory/delete',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 新增排课周期
+export function addDefaultClassesCycle (data) {
+  return request({
+    url: '/web-server/vipGroupDefaultClassesCycle/add',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 修改排课周期
+export function resetDefaultClassesCycle (data) {
+  return request({
+    url: '/web-server/vipGroupDefaultClassesCycle/update',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 删除排课周期
+export function removeDefaultClassesCycle (data) {
+  return request({
+    url: '/web-server/vipGroupDefaultClassesCycle/delete',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 新增默认单价
+export function defaultClassesUnitPrice (data) {
+  return request({
+    url: '/web-server/vipGroupDefaultClassesUnitPrice/add',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 查询活动方案列表
+export function vipGroupActivity (data) {
+  return request({
+    url: '/web-server/vipGroupActivity/queryPage',
+    method: 'get',
+    params: data
+  })
+}

+ 9 - 1
src/layout/components/Navbar.vue

@@ -20,7 +20,7 @@
           <img src="@/assets/images/base/placehorder-icon.png"
                class="user-avatar" />
           <!-- <i class="el-icon-caret-bottom" /> -->
-          <span>XXX老師</span>
+          <span>{{ username }}</span>
         </div>
         <el-dropdown-menu slot="dropdown"
                           class="user-dropdown">
@@ -51,6 +51,11 @@ import { mapGetters } from "vuex";
 // import Hamburger from '@/components/Hamburger'
 
 export default {
+  data () {
+    return {
+      username: ''
+    }
+  },
   components: {
     // Breadcrumb,
     // Hamburger
@@ -61,6 +66,9 @@ export default {
   mounted () {
     // 手动加入
     this.toggleSideBar();
+    this.username = this.$store.getters.name;
+    console.log(this.$store.getters.name)
+
   },
   methods: {
     toggleSideBar () {

+ 20 - 0
src/router/index.js

@@ -232,6 +232,26 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/vipParameterManager',
+    name: 'vipParameterManager',
+    component: Layout,
+    meta: { title: 'vip参数设置' },
+    children: [{
+      path: 'vipParameterManager',
+      meta: { title: 'vip参数设置' },
+      component: () => import('@/views/categroyManager/generalSettings/vipParameterManager'),
+    }, {
+      path: 'vipChargeSeting',
+      meta: { title: 'vip收费类型设置' },
+      component: () => import('@/views/categroyManager/vipChargeSeting')
+    }, {
+      path: 'vipActiveList',
+      meta: { title: 'vip活动方案' },
+      component: () => import('@/views/categroyManager/vipActiveList')
+    }
+    ]
+  },
   // {
   //   path: '/business',
   //   component: Layout,

+ 1 - 0
src/utils/request.js

@@ -58,6 +58,7 @@ service.interceptors.request.use(
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['Authorization'] = getToken()
+      // config.headers['content-type'] = "application/x-www-form-urlencoded"
     }
     return config
   },

+ 2 - 1
src/views/buildVip/components/vipBaseInfo.vue

@@ -3,7 +3,8 @@
     <el-form :inline="true"
              :model="vipForm">
       <el-form-item label="指导老师">
-        <el-input v-model="vipForm.teacher"></el-input>
+        <el-input v-model="vipForm.teacher"
+                  disabled></el-input>
       </el-form-item>
       <el-form-item label="课程名称">
         <el-input v-model="vipForm.course"></el-input>

+ 334 - 0
src/views/categroyManager/generalSettings/vipParameterManager.vue

@@ -0,0 +1,334 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div> vip参数设置
+    </h2>
+    <div class="m-core">
+      <div class="listWrap">
+        <div class="left">
+          <div class="newBand"
+               @click="addGroupCategory">新建</div>
+          <el-table :data='leftList'
+                    :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+            <el-table-column label="课程形式"
+                             prop="name"
+                             width="180">
+            </el-table-column>
+            <el-table-column label="班级人数"
+                             prop="studentNum"
+                             width="180">
+            </el-table-column>
+            <el-table-column label="课程课时"
+                             prop="singleClassMinutes"
+                             width="180">
+            </el-table-column>
+            <el-table-column label="操作"
+                             width="180">
+              <template slot-scope="scope">
+                <div>
+                  <el-button type="text"
+                             @click="resetGroupCategory(scope.row)">修改</el-button>
+                  <el-popover placement="top"
+                              width="160"
+                              :ref="scope.$index">
+                    <p>您确定删除该课程形态吗?</p>
+                    <div style="text-align: right; margin: 0">
+                      <el-button size="mini"
+                                 type="text"
+                                 @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
+                      <el-button type="primary"
+                                 size="mini"
+                                 @click="removeGroupCategory(scope)">确定</el-button>
+                    </div>
+                    <el-button type="text"
+                               slot="reference">删除</el-button>
+                  </el-popover>
+
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="right">
+          <div class="newBand"
+               @click="addVipTimer">新建</div>
+          <el-table :data='rightList'
+                    :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+            <el-table-column label="达到课时总数/次"
+                             prop="maxClassTimes"
+                             width="180">
+            </el-table-column>
+            <el-table-column label="可排课时间段"
+                             prop="month"
+                             width="180">
+            </el-table-column>
+            <el-table-column label="操作"
+                             width="180">
+              <template slot-scope="scope">
+                <div>
+                  <el-button type="text"
+                             @click="resetTimerList(scope.row)">修改</el-button>
+                  <el-popover placement="top"
+                              width="160"
+                              :ref="scope.$index">
+                    <p>您确定删除该周期循环吗?</p>
+                    <div style="text-align: right; margin: 0">
+                      <el-button size="mini"
+                                 type="text"
+                                 @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
+                      <el-button type="primary"
+                                 size="mini"
+                                 @click="removeDefaultClassesCycle(scope)">确定</el-button>
+                    </div>
+                    <el-button type="text"
+                               slot="reference">删除</el-button>
+                  </el-popover>
+
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+
+    <!-- 课程类型新增弹窗 -->
+    <el-dialog title="vip课程形式"
+               :visible.sync="vipStatus">
+      <el-form :model="vipStatusFrom"
+               ref='vipStatus'>
+        <el-form-item label="活动名称"
+                      prop='name'
+                      :label-width="formLabelWidth">
+          <el-input v-model="vipStatusFrom.name"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="班级人数"
+                      prop="num"
+                      :label-width="formLabelWidth">
+          <el-input v-model="vipStatusFrom.num"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="课程课时"
+                      prop="timer"
+                      :label-width="formLabelWidth">
+          <el-input v-model="vipStatusFrom.timer"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="closeVipStatus">取 消</el-button>
+        <el-button type="primary"
+                   @click="addVipStatus">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 周期循环新增弹窗 -->
+    <el-dialog title="vip时间段"
+               :visible.sync="timerStatus">
+      <el-form :model="vipTimerFrom"
+               ref='timerStatus'>
+        <el-form-item label="达到课时总数/次"
+                      prop='count'
+                      :label-width="formLabelWidth">
+          <el-input v-model="vipTimerFrom.count"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="可排课时间段/月"
+                      prop="timer"
+                      :label-width="formLabelWidth">
+          <el-input v-model="vipTimerFrom.timer"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="timerStatus=false">取 消</el-button>
+        <el-button type="primary"
+                   @click="addTimerStatus">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { vipGroupCategory, getDefaultClassesCycle, addVipGroupCategory, resetVipGroupCategory, removeVipGroupCategory, addDefaultClassesCycle, resetDefaultClassesCycle, removeDefaultClassesCycle } from "@/api/vipSeting"
+export default {
+  data () {
+    return {
+      leftList: [],
+      rightList: [],
+      vipStatus: false, // 课程形态弹窗状态
+      formLabelWidth: '120px',
+      vipStatusFrom: {
+        name: '',
+        num: '',
+        timer: '',
+        isAdd: true,
+        id: ''
+      }, // 弹窗内容
+      statusRemovevisible: false,
+      timerStatus: false, //课程时间段弹窗状态
+      vipTimerFrom: {
+        count: '',
+        timer: '',
+        isAdd: true,
+        id: ''
+      }
+    }
+  },
+  mounted () {
+    this.getVipGroupCategoryList()
+    this.getDefaultClassesCycle()
+  },
+  methods: {
+    getVipGroupCategoryList () {
+      // 获取默认左边参数
+      vipGroupCategory().then(res => {
+        if (res.code == 200) {
+          this.leftList = res.data;
+        }
+      })
+    },
+    getDefaultClassesCycle () {
+      // 获取默认右边参数
+      getDefaultClassesCycle().then(res => {
+        this.rightList = res.data;
+      })
+    },
+    // 新增分类
+    addGroupCategory () {
+      // this.$refs['vipStatus'].resetFields();
+      this.vipStatus = true;
+      this.vipStatusFrom.isAdd = true;
+      this.vipStatusFrom.id = '';
+    },
+    closeVipStatus () {
+      this.vipStatus = false;
+    },
+    addVipStatus () {
+      // 点击添加后 发送请求单独添加=> 刷新列表
+      // 判断是添加还是修改
+      if (this.vipStatusFrom.isAdd) {
+        // 添加
+        addVipGroupCategory({
+          name: this.vipStatusFrom.name,
+          singleClassMinutes: this.vipStatusFrom.timer,
+          studentNum: this.vipStatusFrom.num
+        }).then(res => {
+          if (res.code == 200) {
+            this.getVipGroupCategoryList();
+            this.vipStatus = false;
+          }
+        })
+      } else {
+        // 修改
+        resetVipGroupCategory({
+          name: this.vipStatusFrom.name,
+          singleClassMinutes: this.vipStatusFrom.timer,
+          studentNum: this.vipStatusFrom.num,
+          id: this.vipStatusFrom.id
+        }).then(res => {
+          this.getVipGroupCategoryList();
+          this.vipStatus = false;
+        })
+      }
+    },
+    resetGroupCategory (row) {
+      // 修改课程形式
+      console.log(row);
+      this.vipStatus = true;
+      this.vipStatusFrom.name = row.name;
+      this.vipStatusFrom.timer = row.singleClassMinutes;
+      this.vipStatusFrom.num = row.studentNum;
+      this.vipStatusFrom.id = row.id;
+      this.vipStatusFrom.isAdd = false;
+    },
+    removeGroupCategory (scope) {
+      // 删除 
+      removeVipGroupCategory({
+        id: scope.row.id
+      }).then(res => {
+        if (res.code == 200) {
+          // scope._self.$refs[scope.$index].doClose();
+          this.getVipGroupCategoryList();
+        }
+      })
+    },
+    // 新增时间段
+    addVipTimer () {
+      this.timerStatus = true;
+      this.vipTimerFrom.isAdd = true;
+      this.vipTimerFrom.id = '';
+    },
+    addTimerStatus () {
+      // 点击添加后 发送请求单独添加=> 刷新列表
+      // 判断是添加还是修改
+      if (this.vipTimerFrom.isAdd) {
+        // 添加
+        addDefaultClassesCycle({
+          organId: this.$store.getters.organ,
+          maxClassTimes: this.vipTimerFrom.count,
+          month: this.vipTimerFrom.timer,
+        }).then(res => {
+          if (res.code == 200) {
+            this.getDefaultClassesCycle();
+            this.timerStatus = false;
+          }
+        })
+      } else {
+        // 修改
+        resetDefaultClassesCycle({
+          maxClassTimes: this.vipTimerFrom.count,
+          month: this.vipTimerFrom.timer,
+          id: this.vipTimerFrom.id
+        }).then(res => {
+          this.getDefaultClassesCycle();
+          this.timerStatus = false;
+        })
+      }
+    },
+    resetTimerList (row) {
+      this.timerStatus = true;
+      this.vipTimerFrom.count = row.maxClassTimes;
+      this.vipTimerFrom.timer = row.month;
+      this.vipTimerFrom.id = row.id;
+      this.vipTimerFrom.isAdd = false;
+    },
+    // 删除时间管理
+    removeDefaultClassesCycle (scope) {
+      removeDefaultClassesCycle({
+        id: scope.row.id
+      }).then(res => {
+        if (res.code == 200) {
+          scope._self.$refs[scope.$index].doClose();
+          this.getDefaultClassesCycle();
+        }
+      })
+    }
+  },
+  watch: {
+    vipStatus (val) {
+      if (!val) {
+        this.$refs['vipStatus'].resetFields();
+      }
+    },
+    timerStatus (val) {
+      if (!val) {
+        this.$refs['timerStatus'].resetFields();
+      }
+    }
+  }
+
+}
+</script>
+<style lang="scss" scoped>
+.left {
+  margin-right: 20px;
+}
+.listWrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+}
+</style>

+ 172 - 109
src/views/categroyManager/insideSetting/addressManager.vue

@@ -2,7 +2,8 @@
   <div class='m-container'>
     <h2>分部教学点</h2>
     <div class="m-core">
-      <div @click="teachingStatus = true" class='newBand'>新建</div>
+      <div @click="teachingStatus = true"
+           class='newBand'>新建</div>
       <!-- 搜索类型 -->
       <!-- <el-form :inline="true"
                class="searchForm"
@@ -32,11 +33,14 @@
       <!-- 列表 -->
       <div class="tableWrap">
         <el-table :data='tableList'>
-          <el-table-column align='center' width="55" prop="id"
+          <el-table-column align='center'
+                           width="55"
+                           prop="id"
                            label="编号">
           </el-table-column>
-          <el-table-column align='center' prop="name"
-                           label="教学点名称"> 
+          <el-table-column align='center'
+                           prop="name"
+                           label="教学点名称">
           </el-table-column>
           <el-table-column align='center'
                            label="教学点来源"
@@ -49,20 +53,26 @@
                            label="费用">
             <template slot-scope="scope">
               {{ scope.row.cooperationOrganId ? '免费' : scope.row.remark }}
-            </template> 
+            </template>
           </el-table-column>
           <el-table-column align='center'
                            label="上课地点详情">
             <template slot-scope="scope">
               {{ scope.row.address.split(',').join('') }}
-            </template> 
+            </template>
           </el-table-column>
-          <el-table-column align='center' prop="delFlag"
+          <el-table-column align='center'
+                           prop="delFlag"
                            label="状态">
             <template slot-scope="scope">
-              <el-tag effect="dark" type="danger" v-if="scope.row.delFlag == 2" key="delFlag"> 停用</el-tag>
-              <el-tag effect="dark" v-else key="delFlag">启用</el-tag>
-            </template> 
+              <el-tag effect="dark"
+                      type="danger"
+                      v-if="scope.row.delFlag == 2"
+                      key="delFlag"> 停用</el-tag>
+              <el-tag effect="dark"
+                      v-else
+                      key="delFlag">启用</el-tag>
+            </template>
           </el-table-column>
           <el-table-column align='center'
                            label="课酬补贴">
@@ -73,10 +83,16 @@
           <el-table-column align='center'
                            label="操作">
             <template slot-scope="scope">
-              <el-button @click="openTeaching('update', scope.row)" type="text">修改</el-button>
-              <el-button v-if="scope.row.delFlag == 0" @click="onUpdateSubmit(scope.row, 2)" type="text">停用</el-button>
-              <el-button v-if="scope.row.delFlag == 2" @click="onUpdateSubmit(scope.row, 0)" type="text">启用</el-button>
-              <el-button @click="onUpdateSubmit(scope.row, 1)" type="text">删除</el-button>
+              <el-button @click="openTeaching('update', scope.row)"
+                         type="text">修改</el-button>
+              <el-button v-if="scope.row.delFlag == 0"
+                         @click="onUpdateSubmit(scope.row, 2)"
+                         type="text">停用</el-button>
+              <el-button v-if="scope.row.delFlag == 2"
+                         @click="onUpdateSubmit(scope.row, 0)"
+                         type="text">启用</el-button>
+              <el-button @click="onUpdateSubmit(scope.row, 1)"
+                         type="text">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -88,44 +104,89 @@
       </div>
     </div>
 
-    <el-dialog :title="formTitle[formActionTitle]" :visible.sync="teachingStatus" @close="onFormClose('ruleForm')" width="500px">
-      <el-form :model="form" :rules="rules" ref="ruleForm">
-        <el-form-item label="教学点名称" prop="name" :label-width="formLabelWidth">
-          <el-input v-model="form.name" autocomplete="off"></el-input>
+    <el-dialog :title="formTitle[formActionTitle]"
+               :visible.sync="teachingStatus"
+               @close="onFormClose('ruleForm')"
+               width="500px">
+      <el-form :model="form"
+               :rules="rules"
+               ref="ruleForm">
+        <el-form-item label="教学点名称"
+                      prop="name"
+                      :label-width="formLabelWidth">
+          <el-input v-model="form.name"
+                    autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="教学点来源" prop="source" :label-width="formLabelWidth">
+        <el-form-item label="教学点来源"
+                      prop="source"
+                      :label-width="formLabelWidth">
           <el-select v-model="form.source">
-            <el-option label="合作单位" value="1"></el-option>
-            <el-option label="租赁" value="2"></el-option>
+            <el-option label="合作单位"
+                       value="1"></el-option>
+            <el-option label="租赁"
+                       value="2"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item v-if="form.source == 1" prop="cooperationOrganId" label="合作单位" :label-width="formLabelWidth">
+        <el-form-item v-if="form.source == 1"
+                      prop="cooperationOrganId"
+                      label="合作单位"
+                      :label-width="formLabelWidth">
           <el-select v-model="form.cooperationOrganId">
-            <el-option v-for="item in breachList" :key="item.value"
-              :label="item.label" :value="item.value"></el-option>
+            <el-option v-for="item in breachList"
+                       :key="item.value"
+                       :label="item.label"
+                       :value="item.value"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item v-if="form.source == 2" prop="remark" label="费用" :label-width="formLabelWidth">
-          <el-input v-model="form.remark" autocomplete="off"></el-input>
+        <el-form-item v-if="form.source == 2"
+                      prop="remark"
+                      label="费用"
+                      :label-width="formLabelWidth">
+          <el-input v-model="form.remark"
+                    autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item prop="address" :show-message="addressMessage" label="上课地点" :label-width="formLabelWidth">
-          <el-input class="text-address" v-model="form.address" :disabled="true">
-            <el-button slot="append" @click="addMap" type="primary" icon="el-icon-plus">选择</el-button>
+        <el-form-item prop="address"
+                      :show-message="addressMessage"
+                      label="上课地点"
+                      :label-width="formLabelWidth">
+          <el-input class="text-address"
+                    v-model="form.address"
+                    :disabled="true">
+            <el-button slot="append"
+                       @click="addMap"
+                       type="primary"
+                       icon="el-icon-plus">选择</el-button>
           </el-input>
         </el-form-item>
-        <el-form-item label="课酬补贴" prop="subsidy" :label-width="formLabelWidth">
-          <el-input v-model.number="form.subsidy" type="number" autocomplete="off"></el-input>
+        <el-form-item label="课酬补贴"
+                      prop="subsidy"
+                      :label-width="formLabelWidth">
+          <el-input v-model.number="form.subsidy"
+                    type="number"
+                    autocomplete="off"></el-input>
         </el-form-item>
       </el-form>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer"
+            class="dialog-footer">
         <el-button @click="onTeachingCancel('ruleForm')">取 消</el-button>
-        <el-button type="primary" @click="onTeachingSubmit('ruleForm')">确 定</el-button>
+        <el-button type="primary"
+                   @click="onTeachingSubmit('ruleForm')">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="选择地图" custom-class="map-container" :visible.sync="mapStatus" width="800px">
-      <el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box>
-      <el-amap :zoom="zoom" :plugin="plugin" :center="center">
-          <el-amap-marker :events="markerEvents()" v-for="(marker, index) in markers" :key="index" :position="marker" ></el-amap-marker>
+    <el-dialog title="选择地图"
+               custom-class="map-container"
+               :visible.sync="mapStatus"
+               width="800px">
+      <el-amap-search-box class="search-box"
+                          :search-option="searchOption"
+                          :on-search-result="onSearchResult"></el-amap-search-box>
+      <el-amap :zoom="zoom"
+               :plugin="plugin"
+               :center="center">
+        <el-amap-marker :events="markerEvents()"
+                        v-for="(marker, index) in markers"
+                        :key="index"
+                        :position="marker"></el-amap-marker>
       </el-amap>
     </el-dialog>
   </div>
@@ -134,24 +195,24 @@
 import pagination from '@/components/Pagination/index'
 // 地图
 (function () {
-let func = EventTarget.prototype.addEventListener;
-let supportsPassive = false
-try {
-  let opts = Object.defineProperty({}, 'passive', {
-    get: function() {
-    supportsPassive = true;
-    }
-  })
-  document.addEventListener("testPassive", null, opts);
-  document.removeEventListener('testPassive', null, opts);
-} catch(e) {}
+  let func = EventTarget.prototype.addEventListener;
+  let supportsPassive = false
+  try {
+    let opts = Object.defineProperty({}, 'passive', {
+      get: function () {
+        supportsPassive = true;
+      }
+    })
+    document.addEventListener("testPassive", null, opts);
+    document.removeEventListener('testPassive', null, opts);
+  } catch (e) { }
 
-EventTarget.prototype.addEventListener = function (type, fn, capture) {
-  this.func = func;
-  capture = capture instanceof Object ? capture : {};
-  capture.passive = supportsPassive;
-  this.func(type, fn, capture);
-};
+  EventTarget.prototype.addEventListener = function (type, fn, capture) {
+    this.func = func;
+    capture = capture instanceof Object ? capture : {};
+    capture.passive = supportsPassive;
+    this.func(type, fn, capture);
+  };
 }());
 import { schoolQueryPage, schoolAdd, schoolUpdate, queryByOrganId, schoolDel } from '@/api/systemManage'
 import store from '@/store'
@@ -192,11 +253,11 @@ export default {
       },
       rules: {
         name: [{ required: true, message: '请输入教学点名称', trigger: 'blur' }],
-        source: [{required: true, message: '请选择教学点来源', trigger: 'change'}],
-        remark: [{ required: true, message: '请输入教学点名称', trigger: 'blur'}],
-        address: [{required: true, message: '请选择上课地点', trigger: 'blur'}],
-        cooperationOrganId: [{required: true, message: '请选择合作单位', trigger: 'change'}],
-        subsidy: [{ type: 'number', message: '课酬补贴只能为数字', trigger: 'blur'}]
+        source: [{ required: true, message: '请选择教学点来源', trigger: 'change' }],
+        remark: [{ required: true, message: '请输入教学点名称', trigger: 'blur' }],
+        address: [{ required: true, message: '请选择上课地点', trigger: 'blur' }],
+        cooperationOrganId: [{ required: true, message: '请选择合作单位', trigger: 'change' }],
+        subsidy: [{ type: 'number', message: '课酬补贴只能为数字', trigger: 'blur' }]
       },
       addressMessage: true,
       mapStatus: false,
@@ -205,28 +266,28 @@ export default {
       markers: [],
       plugin: [],
       searchOption: {
-          city: '',
-          citylimit: true,
-          pageSize: 1, // 单页显示结果条数
-          pageIndex: 1, // 页码
-          autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
+        city: '',
+        citylimit: true,
+        pageSize: 1, // 单页显示结果条数
+        pageIndex: 1, // 页码
+        autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
       },
       breachList: [], // 分部列表
     }
   },
-  mounted() {
+  mounted () {
     this.getList()
     this.getBreachList()
   },
   methods: {
-    onTeachingSubmit(formName) { // 添加数据
+    onTeachingSubmit (formName) { // 添加数据
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.form.address = this.addressDetail.address
           this.form.longitudeLatitude = this.addressDetail.poi
-          if(this.formActionTitle == 'create') {  
+          if (this.formActionTitle == 'create') {
             schoolAdd(this.form).then(res => {
-              if(res.code == 200) {
+              if (res.code == 200) {
                 this.$message({
                   message: '添加成功',
                   type: 'success'
@@ -237,9 +298,9 @@ export default {
                 this.$message.error(res.msg)
               }
             })
-          } else if(this.formActionTitle == 'update') {
+          } else if (this.formActionTitle == 'update') {
             schoolUpdate(this.form).then(res => {
-              if(res.code == 200) {
+              if (res.code == 200) {
                 this.$message({
                   message: '修改成功',
                   type: 'success'
@@ -256,26 +317,26 @@ export default {
         }
       })
     },
-    onTeachingCancel(formName) {
+    onTeachingCancel (formName) {
       this.teachingStatus = false
       this.$refs[formName].clearValidate()
     },
-    addMap() { // 
+    addMap () { // 
       this.mapStatus = true
       let poi = this.addressDetail.poi
       // 获取经纬度
-      if(poi) {
+      if (poi) {
         this.markers = []
         this.center = [poi.split(',')[0], poi.split(',')[1]];
         this.markers.push([poi.split(',')[0], poi.split(',')[1]])
       }
     },
-    onSearchResult(pois) { // 搜索出来的Marker
+    onSearchResult (pois) { // 搜索出来的Marker
       let latSum = 0
       let lngSum = 0
       if (pois.length > 0) {
         pois.forEach(poi => {
-          let {lng, lat} = poi;
+          let { lng, lat } = poi;
           lngSum += lng;
           latSum += lat;
           this.markers.push([poi.lng, poi.lat]);
@@ -287,59 +348,59 @@ export default {
         this.center = [center.lng, center.lat];
       }
     },
-    markerEvents() { // marker 事件添加
+    markerEvents () { // marker 事件添加
       let that = this
       return {
         click: (e) => {
           let geocoder = new AMap.Geocoder()
-          geocoder.getAddress(e.lnglat, function(status, result) {
-            if(status === 'complete' && result.regeocode) {
-                result.regeocode.lnglat = e.lnglat
-                let ct = result.regeocode.addressComponent
-                that.addressDetail = {
-                  address: ct.province + ',' + ct.city + ',' + ct.district + ','+ ct.township + ct.street + ct.streetNumber,
-                  poi: e.lnglat.lng + ',' + e.lnglat.lat
-                }
-                that.form.address = result.regeocode.formattedAddress
-                that.mapStatus = false
-                that.addressMessage = false
+          geocoder.getAddress(e.lnglat, function (status, result) {
+            if (status === 'complete' && result.regeocode) {
+              result.regeocode.lnglat = e.lnglat
+              let ct = result.regeocode.addressComponent
+              that.addressDetail = {
+                address: ct.province + ',' + ct.city + ',' + ct.district + ',' + ct.township + ct.street + ct.streetNumber,
+                poi: e.lnglat.lng + ',' + e.lnglat.lat
+              }
+              that.form.address = result.regeocode.formattedAddress
+              that.mapStatus = false
+              that.addressMessage = false
             } else {
-                that.$message.error('请重新选择地址')
+              that.$message.error('请重新选择地址')
             }
           })
         }
       }
     },
-    getList() {
+    getList () {
       schoolQueryPage({
         organId: this.form.organId,
         rows: this.pageInfo.limit,
         page: this.pageInfo.page
       }).then(res => {
-        if(res.code == 200 && res.data) {
+        if (res.code == 200 && res.data) {
           this.tableList = res.data.rows
           this.pageInfo.total = res.data.total
         }
       })
     },
-    getBreachList() { // 获取分部列表
+    getBreachList () { // 获取分部列表
       queryByOrganId({
         organId: this.form.organId
       }).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           // 判断是否有数据
-          if(!res.data && res.data.length <= 0) return
+          if (!res.data && res.data.length <= 0) return
           res.data.forEach(r => {
             this.breachList.push({
               value: r.id,
               label: r.name
             })
           })
-          
+
         }
       })
     },
-    openTeaching(type, row) {
+    openTeaching (type, row) {
       // 重置数据
       this.form = {
         id: null,
@@ -351,7 +412,7 @@ export default {
       this.teachingStatus = true
       this.formActionTitle = type
       // 修改的时候赋值
-      if(type == 'update') {
+      if (type == 'update') {
         this.addressDetail = {
           address: row.address,
           poi: row.longitudeLatitude
@@ -368,14 +429,14 @@ export default {
         }
       }
     },
-    onFormClose(formName) { // 关闭弹窗重置验证
+    onFormClose (formName) { // 关闭弹窗重置验证
       this.$refs[formName].clearValidate()
     },
-    filterOrgan(val) {
+    filterOrgan (val) {
       let result = ''
-      if(val.cooperationOrganId) {
+      if (val.cooperationOrganId) {
         this.breachList.forEach(res => {
-          if(res.value == val.cooperationOrganId) {
+          if (res.value == val.cooperationOrganId) {
             result = res.label
           }
         })
@@ -384,11 +445,11 @@ export default {
       }
       return result
     },
-    onUpdateSubmit(row, type) {
+    onUpdateSubmit (row, type) {
       let msg
-      if(type == 2) {
+      if (type == 2) {
         msg = '停用'
-      } else if(type == 0) {
+      } else if (type == 0) {
         msg = '启用'
       } else {
         msg = '删除'
@@ -402,13 +463,13 @@ export default {
           id: row.id,
           delFlag: type
         }).then(res => {
-          if(res.code == 200) {
+          if (res.code == 200) {
             this.$message({
               message: '修改成功',
               type: 'success'
             })
             this.teachingStatus = false
-            if(type == 2 || type == 0) {
+            if (type == 2 || type == 0) {
               row.delFlag = type
             } else {
               this.getList()
@@ -439,14 +500,17 @@ export default {
     padding: 0;
   }
 }
-.el-input-group__append, .el-button--primary {
+.el-input-group__append,
+.el-button--primary {
   background: #14928a;
   border-color: #14928a;
   color: #fff;
-  &:hover, &:active, &:focus {
+  &:hover,
+  &:active,
+  &:focus {
     background: #14928a;
     border-color: #14928a;
-    color: #FFF;
+    color: #fff;
   }
 }
 .el-vue-search-box-container {
@@ -455,5 +519,4 @@ export default {
   margin-top: 10px;
   z-index: 99999 !important;
 }
-
 </style>

+ 64 - 0
src/views/categroyManager/vipActiveList.vue

@@ -0,0 +1,64 @@
+<template >
+  <div class="m-container">
+    <h2>vip活动方案 <div class="squrt"></div>
+    </h2>
+    <div class="m-core">
+      <div class="newBand">新建</div>
+      <div class="tableWrap">
+        <el-table :data='tableList'
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column align='center'
+                           label="活动编号">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="活动说明">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="试用课程形式">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="活动类型">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="结算标准">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="结算说明">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="启用状态">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="活动持续时间">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="课程安排时间">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="操作">
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { vipGroupActivity } from "@/api/vipSeting"
+export default {
+  data () {
+    return {
+      tableList: []
+    }
+  },
+  mounted () {
+    console.log(this.$store.organ)
+    vipGroupActivity({ 'organId': 1 }
+
+    ).then(res => {
+      console.log(res);
+    })
+  }
+}
+</script>
+<style lang="scss">
+</style>

+ 87 - 0
src/views/categroyManager/vipChargeSeting.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="m-container">
+    <h2>VIP课时收费设置 <div class="squrt"></div>
+    </h2>
+    <div class="m-core">
+      <div class="tableWrap">
+        <el-table :data="dataList"
+                  style="width:720px;"
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column prop="name"
+                           label="课程形式"
+                           width="180">
+          </el-table-column>
+          <el-table-column prop="onlineClassesUnitPrice"
+                           label="线上课单价"
+                           width="180">
+            <template slot-scope="scope">
+              <div>
+                <el-input v-model="scope.row.onlineClassesUnitPrice"></el-input>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="offlineClassesUnitPrice"
+                           label="线下课单价"
+                           width="180">
+            <template slot-scope="scope">
+              <div>
+                <el-input v-model="scope.row.offlineClassesUnitPrice"></el-input>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作"
+                           width="180">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text"
+                           @click="saveSeting(scope.row)">保存</el-button>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { vipGroupCategory, defaultClassesUnitPrice } from '@/api/vipSeting'
+export default {
+  data () {
+    return {
+      dataList: []
+    }
+  },
+  mounted () {
+    // 获取课程形态 设置vip课酬
+    vipGroupCategory({ organId: this.$store.getters.organ }).then(res => {
+      if (res.code == 200) {
+        this.dataList = res.data;
+      }
+
+    })
+  },
+  methods: {
+    saveSeting (row) {
+      defaultClassesUnitPrice({
+        offlineClassesUnitPrice: row.offlineClassesUnitPrice,
+        onlineClassesUnitPrice: row.onlineClassesUnitPrice,
+        organId: this.$store.getters.organ,
+        vipGroupCategoryId: row.id
+      }).then(res => {
+        if (res.code == 200) {
+          // 保存成功提示=> 刷新列表
+          this.$message({
+            message: '保存成功',
+            type: 'success'
+          });
+        } else {
+          // 保存失败
+          this.$message.error('保存失败,请重试');
+        }
+      })
+    }
+  },
+}
+</script>
+<style lang="scss">
+</style>

+ 6 - 5
src/views/teamBuild/components/teamBaseInfo.vue

@@ -172,7 +172,7 @@
             <el-input type='textarea'
                       :rows="1"
                       style="width:500px"
-                      value="年度安排个月共xxx课时,课时,原价xxx元,现价xxxx元/月(约 xxxx元/月 )"></el-input>
+                      v-model="checkList.submit.value"></el-input>
           </div>
         </div>
         <div class="head noMargin">付费方式:</div>
@@ -305,7 +305,8 @@ export default {
           value: ''
         },
         submit: {
-          ischeck: false
+          ischeck: false,
+          value: '年度安排个月共xxx课时,课时,原价xxx元,现价xxxx元/月(约 xxxx元/月 )'
         }
       }, // 选中的集合
       chioseMonth: '', // 选中的月份
@@ -387,9 +388,9 @@ export default {
         })
       }
     })
-    // getPayStatus({ 'rows': 1000 }).then(res => {
-    //   console.log(res);
-    // })
+    getPayStatus({ 'rows': 1000 }).then(res => {
+      console.log(res);
+    })
   },
   methods: {
     gotoNext () {

+ 2 - 2
vue.config.js

@@ -18,8 +18,8 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
 // http://192.168.3.28:8000
 
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://47.99.212.176:8000' // 测试服
-// let target = 'http://192.168.3.48:8000' // 乔
+// let target = 'http://47.99.212.176:8000' // 测试服
+let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**