mo 3 年之前
父節點
當前提交
c426b2494b

+ 1 - 1
src/components/select-all/index.vue

@@ -120,7 +120,7 @@ export default {
   }
 }
 .btn {
-  width: 50px;
+  // width: 50px;
   // padding: 0 10px;
   border-left: none;
   border-radius: 0 4px 4px 0;

+ 47 - 0
src/views/couponManager/couponGiveChiose.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column
+        align="center"
+        prop="organName"
+        label="分部"
+      ></el-table-column>
+      <el-table-column align="center" prop="organName" label="学生姓名(编号)">
+        <template slot-scope="scope">
+          <div>{{ scope.row.userName }}({{ scope.row.userId }})</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="phone"
+        label="手机号"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="couponId"
+        label="优惠券编号"
+      ></el-table-column>
+      <el-table-column align="center" prop="couponId" label="状态">
+        <template slot-scope="scope">
+          <div>
+            <p>{{ scope.row.usageStatus | usageStatus }}</p>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+<script>
+export default {
+  props:['tableList'],
+  data() {
+    return {};
+  },
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 212 - 0
src/views/couponManager/couponGiveList.vue

@@ -0,0 +1,212 @@
+<!--  -->
+<template>
+  <div>
+    <div class="m-core">
+      <el-form
+        :inline="true"
+        :model="searchForm"
+        @submit="search"
+        @reset="onReSet"
+      >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="姓名、编号、手机号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="organId">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.organId"
+            filterable
+            clearable
+            placeholder="请选择分部"
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="usageStatus">
+          <el-select
+            placeholder="优惠券状态"
+            v-model.trim="searchForm.usageStatus"
+            filterable
+            clearable
+          >
+            <el-option label="未使用" value="0"></el-option>
+            <el-option label="已使用" value="1"></el-option>
+            <el-option label="已过期" value="2"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="分部"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="学生姓名(编号)"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.userName }}({{ scope.row.userId }})</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="phone"
+            label="手机号"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="couponId"
+            label="优惠券编号"
+          ></el-table-column>
+          <el-table-column align="center" prop="couponId" label="状态">
+            <template slot-scope="scope">
+              <div>
+                <p>{{ scope.row.usageStatus | usageStatus }}</p>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    <!--  -->
+    <el-dialog
+      title="激活会员"
+      :visible.sync="couponDetailVisible"
+      width="1000px"
+      append-to-body
+    >
+      <div class="chioseWrap">
+        <p>您将为以下 <span>{{tableList.length}}</span>位学员激活团练宝,激活金额<span></span>元</p>
+        <couponGiveChiose :tableList="tableList" />
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="couponDetailVisible = false">取 消</el-button>
+        <el-button @click="couponDetailVisible = false" type="primary"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+import pagination from "@/components/Pagination/index";
+import { getSysCouponCode } from "./api";
+import Tooltip from "@/components/Tooltip/index";
+import load from "@/utils/loading";
+import couponGiveChiose from "./couponGiveChiose";
+export default {
+  components: { pagination, Tooltip, couponGiveChiose },
+  data() {
+    return {
+      searchForm: {
+        search: null,
+        couponName: null,
+        paymentOrderId: null,
+        usageStatus: null,
+        organId: null,
+      },
+
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  async mounted() {
+    // 获取分部
+    await this.$store.dispatch("setBranchs");
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    async getList() {
+      try {
+        const res = await getSysCouponCode({
+          ...this.searchForm,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$nextTick(() => {
+        this.search();
+      });
+    },
+    gotoOrder(id) {
+      this.$router.push({
+        name: "income",
+        params: { orderNo: id },
+      });
+    },
+  },
+  filters: {
+    usageStatus(val) {
+      let obj = {
+        0: "未使用",
+        1: "已使用",
+        2: "已过期",
+      };
+      return obj[val];
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.chioseWrap {
+  height: 500px;
+  overflow-y: scroll;
+}
+</style>

+ 162 - 0
src/views/couponManager/couponRecord.vue

@@ -0,0 +1,162 @@
+<!-- m-container -->
+<template>
+  <div class="">
+    <!-- <el-page-header @back="onCancel" :content="title"></el-page-header> -->
+    <div class="m-core">
+      <el-form
+        :inline="true"
+        @submit="search"
+        ref="searchForm"
+        :model="searchForm"
+      >
+        <el-form-item prop="search">
+          <el-input
+            class="search"
+            type="text"
+            clearable
+            v-model="searchForm.search"
+            placeholder="学员名称、编号、手机号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="danger" @click="search">搜索</el-button>
+          <el-button native-type="reset" type="primary" @click="onReSet"
+            >重置</el-button
+          >
+        </el-form-item>
+      </el-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          ref="tableList"
+        >
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="发放时间"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="username"
+            label="数量"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="phone"
+            label="操作类型"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="subjectNames"
+            label="操作人"
+          ></el-table-column>
+          <el-table-column align="center" prop="subjectNames" label="操作">
+            <template slot-scope="scope">
+              <div>
+                <auth auths="sysCoupon/delete">
+                  <el-button type="text" @click="couponDetail(scope.row)"
+                    >发放名单</el-button
+                  >
+                </auth>
+                <auth auths="sysCoupon/delete">
+                  <el-button type="text" @click="revokeCoupon(scope.row)"
+                    >撤销发货</el-button
+                  >
+                </auth>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes.sync="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+
+      <el-dialog title="发放名单" :visible.sync="couponDetailVisible" width="1000px" append-to-body>
+        <couponGiveList :activeRow="activeRow" />
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="couponDetailVisible = false">取 消</el-button>
+          <el-button @click="couponDetailVisible = false" type="primary"
+            >确 定</el-button
+          >
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/Pagination/index";
+import { getStudentList, addActivityUserMapperStudents } from "@/api/vipSeting";
+import couponGiveList from'./couponGiveList'
+export default {
+  components: { pagination,couponGiveList },
+  data() {
+    return {
+      searchForm: {
+        search: null,
+      },
+
+      tableList: [],
+      organList: [],
+      title: "",
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      couponDetailVisible:false,
+      activeRow:null
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  async mounted() {
+    // 获取分部
+    if (this.$route.query.row) {
+      this.activeRow = JSON.parse(this.$route.query.row);
+    }
+    this.getList();
+  },
+  methods: {
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
+    async getList() {
+      try {
+        let { organId, ...rest } = this.searchForm;
+        let params = {
+          ...rest,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        };
+        const res = await getStudentList(params);
+        this.tableList = res.data.rows;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    revokeCoupon(row) {},
+    couponDetail(row) {
+      this.activeRow = row;
+      this.couponDetailVisible = true
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>

+ 28 - 21
src/views/couponManager/index.vue

@@ -7,7 +7,6 @@
     </h2>
     <div class="m-core">
       <save-form
-        
         :inline="true"
         :model="searchForm"
         @submit="search"
@@ -58,7 +57,6 @@
           type="primary"
           style="margin-bottom: 30px"
           @click="gotoDetail()"
-          
           >新增优惠券</el-button
         >
       </auth>
@@ -68,7 +66,6 @@
           style="width: 100%"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
-          
         >
           <el-table-column
             align="center"
@@ -153,11 +150,7 @@
               <div>{{ scope.row.fullAmount | hasMoneyFormat }}</div>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="cloudStudyUseStudentDuty"
-
-          >
+          <el-table-column align="center" prop="cloudStudyUseStudentDuty">
             <template slot="header" slot-scope="slot">
               <div class="titleCell">
                 <span>领取上限</span>
@@ -179,11 +172,7 @@
               <div>{{ scope.row.limitExchangeNum }}</div>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="cloudStudyUseStudentDuty"
-
-          >
+          <el-table-column align="center" prop="cloudStudyUseStudentDuty">
             <template slot="header" slot-scope="slot">
               <div class="titleCell">
                 <span>有效期天数</span>
@@ -365,8 +354,8 @@
         />
       </div>
     </div>
-    <el-dialog :title="title" :visible.sync="addCouponVisible" width="1000px">
-      <couponGrant :activeRow="activeRow"/>
+    <el-dialog :title="title" :visible.sync="addCouponVisible" width="1200px">
+      <couponGrant :activeRow="activeRow" />
       <span slot="footer" class="dialog-footer">
         <el-button @click="addCouponVisible = false">取 消</el-button>
         <el-button @click="addCouponVisible = false" type="primary"
@@ -374,6 +363,19 @@
         >
       </span>
     </el-dialog>
+    <el-dialog
+      title="发放记录"
+      :visible.sync="giveCouponVisible"
+      width="1200px"
+    >
+      <couponRecord :activeRow="activeRow" />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="giveCouponVisible = false">取 消</el-button>
+        <el-button @click="giveCouponVisible = false" type="primary"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -385,9 +387,10 @@ import load from "@/utils/loading";
 import { getSysCoupon, resetSysCoupon, delSysCoupon } from "./api";
 import { couponTypeList } from "@/utils/searchArray";
 import Tooltip from "@/components/Tooltip/index";
-import couponGrant from './couponGrant'
+import couponGrant from "./couponGrant";
+import couponRecord from './couponRecord'
 export default {
-  components: { pagination, Tooltip,couponGrant },
+  components: { pagination, Tooltip, couponGrant,couponRecord },
   data() {
     return {
       couponTypeList,
@@ -396,7 +399,7 @@ export default {
         type: null,
         status: null,
       },
-      activeRow:null,
+      activeRow: null,
       tableList: [],
       organList: [],
       rules: {
@@ -406,8 +409,9 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
-      addCouponVisible:false,
-      title:''
+      addCouponVisible: false,
+      giveCouponVisible: false,
+      title: "",
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -521,7 +525,10 @@ export default {
       //   query: { row: JSON.stringify(row) },
       // });
     },
-    getCouponRecord(row) {},
+    getCouponRecord(row) {
+      this.activeRow = row;
+      this.giveCouponVisible = true;
+    },
   },
 };
 </script>

+ 4 - 3
src/views/courseRulersManager/index.scss

@@ -22,10 +22,12 @@ p,
     padding: 0;
   }
   .append {
-    line-height: 26px;
-    height: 26px;
     margin: 0;
     width: 70px!important;
+    /deep/.el-input__inner {
+      height: 34px;
+      line-height: 34px;
+    }
   }
 }
 
@@ -39,7 +41,6 @@ p,
   display: flex;
   flex-direction: row;
   align-items: center;
-  line-height: 28px;
 }
 
 /deep/.el-form-item {

+ 137 - 0
src/views/resetTeaming/components/giveMemberList.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="m-core">
+    <el-form :inline="true" :model="searchForm">
+      <el-form-item>
+        <el-input
+          v-model.trim="searchForm.search"
+          @keyup.enter.native="search"
+          clearable
+          placeholder="学生编号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-select
+          v-model.trim="searchForm.subjectId"
+          style="width: 180px"
+          clearable
+          filterable
+          placeholder="请选择声部"
+        >
+          <el-option
+            v-for="(item, index) in soundList"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="search" type="danger">搜索</el-button>
+        <el-button @click="onReSet" type="primary">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <!-- <div class="newBand"
+         @click="resetPays"
+         v-permission="'musicGroupStudentFee/batchUpdateCourseFee'">修改缴费金额</div> -->
+           <el-button @click="addMember" type="primary">激活会员</el-button>
+
+    <div class="tableWrap">
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableList"
+        ref="multipleTable"
+        max-height="300"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" width="55"> </el-table-column>
+        <el-table-column
+          align="center"
+          prop="userId"
+          label="学员编号"
+        ></el-table-column>
+        <el-table-column align="center" prop="name" label="学员姓名">
+          <!-- <template slot-scope="scope">
+            <div v-if="scope.row.sysUser">
+              {{scope.row.sysUser.username}}
+            </div>
+          </template> -->
+        </el-table-column>
+        <el-table-column align="center" prop="studentId" label="联系电话">
+          <template slot-scope="scope">
+            <div v-if="scope.row.sysUser">
+              {{ scope.row.sysUser.phone }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          prop="subjectName"
+          label="学员声部"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="courseFee"
+          label="团练宝类型"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="courseFee"
+          label="数量"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          prop="courseFee"
+          label="缴费金额(元)"
+        ></el-table-column>
+        <!-- <el-table-column align="center"
+                         label="操作">
+          <template slot-scope="scope">
+            <div>
+              <el-button type="text"
+                         v-permission="'musicGroupStudentFee/batchUpdateCourseFee'"
+                         @click="resetPay(scope.row)">修改金额</el-button>
+            </div>
+          </template>
+        </el-table-column> -->
+      </el-table>
+              <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+    </div>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+export default {
+    components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+        subjectId: "",
+      },
+      soundList: [],
+      tableList:[],
+       rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {},
+  methods: {
+    handleSelectionChange(val) {},
+    search(){},
+    onReSet(){},
+  },
+};
+</script>

+ 18 - 13
src/views/resetTeaming/index.vue

@@ -30,9 +30,9 @@
         trigger="hover"
         ref="popover"
         :open-delay="500"
-          @show="setpopover()"
+        @show="setpopover()"
       >
-      <!--  @setpopover='setpopover'  -->
+        <!--  @setpopover='setpopover'  -->
 
         <teamJournal :teamid="teamid" />
         <!--  v-if="team_status" -->
@@ -157,7 +157,14 @@
         >
           <studentList :teamid="teamid" v-if="activeIndex == '7'" />
         </el-tab-pane>
-        <!-- teamRemainTime -->
+        <el-tab-pane
+          label="待激活团练宝"
+          v-if="permission('/teamStudentList')"
+          name="13"
+          :disabled="!teamid"
+        >
+          <giveMemberList :teamid="teamid" v-if="activeIndex == '13'" />
+        </el-tab-pane>
         <el-tab-pane
           label="剩余时长"
           lazy
@@ -221,7 +228,7 @@ import musicArchives from "@/views/resetTeaming/components/musicArchices";
 import studentList from "@/views/teamDetail/components/studentList";
 import teacherList from "@/views/teamDetail/components/teacherList";
 import courseList from "@/views/teamDetail/components/courseList";
-
+import giveMemberList from "@/views/resetTeaming/components/giveMemberList";
 import forecastNameList from "@/views/teamBuild/forecastNameList";
 // import forecastName from "@/views/teamBuild/forecastName";
 import musicOrder from "@/views/teamDetail/teamDetailedList";
@@ -244,18 +251,18 @@ export default {
     studentList,
     teacherList,
     courseList,
-
     musicOrder,
     teamJournal,
     teamRemainTime,
     teamSignupList,
     musicArchives,
-    forecastNameList
+    forecastNameList,
+    giveMemberList,
   },
   name: "resetTeaming",
   data() {
     return {
-      visible:false,
+      visible: false,
       activeIndex: "1",
       teamid: "",
       baseInfo: null,
@@ -398,12 +405,10 @@ export default {
       return p;
     },
     setpopover(scope) {
-
-      this.$nextTick(()=>{
-            // this.visible = true;
-            this.$refs.popover.updatePopper();
-      })
-
+      this.$nextTick(() => {
+        // this.visible = true;
+        this.$refs.popover.updatePopper();
+      });
     },
     gotoArchices() {
       console.log("跳转");