Преглед на файлове

直播核销卷-改为 课程优惠卷

三七 преди 2 дни
родител
ревизия
584e4abf44
променени са 3 файла, в които са добавени 48 реда и са изтрити 31 реда
  1. 11 1
      src/api/his/courseCouponUser.js
  2. 9 3
      src/views/live/liveConfig/watchReward.vue
  3. 28 27
      src/views/live/liveData/index.vue

+ 11 - 1
src/api/his/courseCouponUser.js

@@ -9,6 +9,16 @@ export function listCourseCouponUser(query) {
   })
 }
 
+// 查询用户看课优惠券列表
+export function listCourseCouponUserListVO(query) {
+  return request({
+    url: '/his/courseCouponUser/listVO',
+    method: 'get',
+    params: query
+  })
+}
+
+
 // 查询用户看课优惠券详细
 export function getCourseCouponUser(id) {
   return request({
@@ -50,4 +60,4 @@ export function exportCourseCouponUser(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 9 - 3
src/views/live/liveConfig/watchReward.vue

@@ -134,7 +134,7 @@
                 <el-option
                   v-for="c in couponList"
                   :key="c.id"
-                  :label="c.couponName + ' (' + c.id + ')'"
+                  :label="c.title + ' (' + c.id + ')'"
                   :value="c.id"
                 ></el-option>
               </el-select>
@@ -261,6 +261,7 @@
 <script>
 import {addConfig, getConfig, updateConfig} from "@/api/live/liveQuestionLive";
 import { listStoreCouponIssue } from "@/api/live/liveCouponIssue";
+import { options as courserCouponOptions } from '@/api/his/courserCoupon'
 
 export default {
   data() {
@@ -437,8 +438,13 @@ export default {
   methods: {
     // 获取核销卷列表(couponType=3)
     getCouponList() {
-      listStoreCouponIssue({ pageNum: 1, pageSize: 999, couponType: '3' }).then(response => {
-        this.couponList = response.rows || [];
+
+      courserCouponOptions().then(res=>{
+        this.couponList = res.data;
+      }).catch(res=>{
+
+      //     listStoreCouponIssue({ pageNum: 1, pageSize: 999, couponType: '3' }).then(response => {
+      //   this.couponList = response.rows || [];
       });
     },
     addRecordTimeRange() {

+ 28 - 27
src/views/live/liveData/index.vue

@@ -563,21 +563,23 @@
           </el-table-column>
           <el-table-column prop="rewardType" label="领取类型" min-width="160">
             <template slot-scope="scope">
-              <dict-tag :options="liveRewardTypeList" :value="scope.row.rewardType"/>
-              <el-button
-                v-if="scope.row.rewardType != 4 && scope.row.rewardType != 99"
-                type="text"
-                size="small"
-                style="margin-left: 8px;"
-                @click="handleOpenRedPacketLog(scope.row)"
-              >红包/积分领取详细</el-button>
-              <el-button
-                v-if="scope.row.rewardType == 4 || scope.row.rewardType == 5 || scope.row.rewardType == 6 || scope.row.rewardType == 7"
-                type="text"
-                size="small"
-                style="margin-left: 8px;"
-                @click="handleOpenCouponLog(scope.row)"
-              >核销卷领取详情</el-button>
+              <div v-if="scope.row.isCompleted == 1">
+                <dict-tag :options="liveRewardTypeList" :value="scope.row.rewardType"/>
+                <el-button
+                  v-if="scope.row.rewardType != 4 && scope.row.rewardType != 99"
+                  type="text"
+                  size="small"
+                  style="margin-left: 8px;"
+                  @click="handleOpenRedPacketLog(scope.row)"
+                >红包/积分领取详细</el-button>
+                <el-button
+                  v-if="scope.row.rewardType == 4 || scope.row.rewardType == 5 || scope.row.rewardType == 6 || scope.row.rewardType == 7"
+                  type="text"
+                  size="small"
+                  style="margin-left: 8px;"
+                  @click="handleOpenCouponLog(scope.row)"
+                >核销卷领取详情</el-button>
+              </div>
             </template>
           </el-table-column>
         </el-table>
@@ -650,14 +652,11 @@
         style="width: 100%"
       >
         <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
-        <el-table-column prop="nickname" label="会员昵称" min-width="120"></el-table-column>
-        <el-table-column prop="phone" label="会员手机号" min-width="120"></el-table-column>
+        <el-table-column prop="nickName" label="会员昵称" min-width="120"></el-table-column>
         <el-table-column prop="couponTitle" label="优惠券名称" min-width="120"></el-table-column>
-        <el-table-column prop="couponPrice" label="优惠券面值" min-width="100" align="center"></el-table-column>
-        <el-table-column prop="useMinPrice" label="最低消费" min-width="100" align="center"></el-table-column>
-        <el-table-column prop="limitTime" label="优惠券结束时间" min-width="160" align="center"></el-table-column>
-        <el-table-column prop="createTime" label="领取时间" min-width="160" align="center"></el-table-column>
-        <el-table-column prop="useTime" label="使用时间" min-width="160" align="center"></el-table-column>
+        <el-table-column prop="limitTime" label="优惠券有效期" min-width="160" align="center"></el-table-column>
+        <el-table-column prop="startTime" label="开始时间" min-width="160" align="center"></el-table-column>
+        <el-table-column prop="updateTime" label="更新时间" min-width="160" align="center"></el-table-column>
         <el-table-column prop="status" label="状态" min-width="100" align="center">
           <template slot-scope="scope">
             <el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag>
@@ -684,8 +683,8 @@ import { listLiveData, exportLiveData, autoTagAndRemark, dashboardData, getLiveD
 import { batchUpdateExternalContactNotes } from "@/api/qw/externalContact";
 import { addTag } from "@/api/qw/externalContact";
 import { listLiveRedPacketLog } from "@/api/live/liveRedPacketLog";
-import { listStoreCouponUser } from "@/api/live/liveCouponUser";
 import { selectDictLabel } from '@/utils/common'
+import { listCourseCouponUser, listCourseCouponUserListVO } from '@/api/his/courseCouponUser'
 
 export default {
   name: "LiveData",
@@ -782,7 +781,8 @@ export default {
         pageNum: 1,
         pageSize: 10,
         userId: null,
-        type: null
+        liveId: null,
+        sendType:2,
       }
     };
   },
@@ -1111,7 +1111,7 @@ export default {
     handleOpenCouponLog(row){
       this.couponLogDrawerVisible = true;
       this.couponLogQueryParams.userId = row.userId;
-      this.couponLogQueryParams.type = '4-live-' + this.currentLiveId;
+      this.couponLogQueryParams.liveId = this.currentLiveId;
       this.couponLogQueryParams.pageNum = 1;
       this.loadCouponLogList();
     },
@@ -1119,11 +1119,12 @@ export default {
     /** 加载核销卷领取详情列表 */
     loadCouponLogList() {
       this.couponLogLoading = true;
-      listStoreCouponUser({
+      listCourseCouponUserListVO({
         pageNum: this.couponLogQueryParams.pageNum,
         pageSize: this.couponLogQueryParams.pageSize,
         userId: this.couponLogQueryParams.userId,
-        type: this.couponLogQueryParams.type
+        sendType: this.couponLogQueryParams.sendType,
+        liveId: this.couponLogQueryParams.liveId,
       }).then(response => {
         this.couponLogList = response.rows || [];
         this.couponLogTotal = response.total || 0;