浏览代码

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_scrm_adminUI

15376779826 2 天之前
父节点
当前提交
ca4cda6cd6

+ 31 - 0
.env.prod-bly

@@ -0,0 +1,31 @@
+# 页面标题
+VUE_APP_TITLE = 倍力优会员商城私域平台
+# 公司名称
+VUE_APP_COMPANY_NAME = 倍力优(北京)健康产业科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD = 京ICP备18042618号-2
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/bly_logo.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = bly-obs2025
+# 存储桶配置
+VUE_APP_COS_BUCKET = beliyo-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://blytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://blyobs.ylrztop.com
+# 生产环境配置
+ENV = 'production'
+
+#FS管理系统/生产环境
+VUE_APP_BASE_API = '/prod-api'

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "build:prod-jz": "vue-cli-service build --mode prod-jz",
     "build:prod-zkzh": "vue-cli-service build --mode prod-zkzh",
     "build:prod-fby": "vue-cli-service build --mode prod-fby",
+    "build:prod-bly": "vue-cli-service build --mode prod-bly",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src",
     "test:unit": "jest --clearCache && vue-cli-service test:unit",

+ 62 - 0
src/api/course/userWatchCourseStatistics.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询会员看课统计-按课程统计列表
+export function listUserWatchCourseStatistics(query) {
+  return request({
+    url: '/course/userWatchCourseStatistics/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询会员看课统计-按课程统计详细
+export function getUserWatchCourseStatistics(id) {
+  return request({
+    url: '/course/userWatchCourseStatistics/' + id,
+    method: 'get'
+  })
+}
+
+// 新增会员看课统计-按课程统计
+export function addUserWatchCourseStatistics(data) {
+  return request({
+    url: '/course/userWatchCourseStatistics',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改会员看课统计-按课程统计
+export function updateUserWatchCourseStatistics(data) {
+  return request({
+    url: '/course/userWatchCourseStatistics',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除会员看课统计-按课程统计
+export function delUserWatchCourseStatistics(id) {
+  return request({
+    url: '/course/userWatchCourseStatistics/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出会员看课统计-按课程统计
+export function exportUserWatchCourseStatistics(query) {
+  return request({
+    url: '/course/userWatchCourseStatistics/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出会员看课统计-按课程统计汇总
+export function exportUserWatchCourseStatisticsTotal(query) {
+  return request({
+    url: '/course/userWatchCourseStatistics/exportTotal',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/course/userWatchStatistics.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询会员看课统计-按营期统计列表
+export function listUserWatchStatistics(query) {
+  return request({
+    url: '/course/userWatchStatistics/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询会员看课统计-按营期统计详细
+export function getUserWatchStatistics(id) {
+  return request({
+    url: '/course/userWatchStatistics/' + id,
+    method: 'get'
+  })
+}
+
+// 新增会员看课统计-按营期统计
+export function addUserWatchStatistics(data) {
+  return request({
+    url: '/course/userWatchStatistics',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改会员看课统计-按营期统计
+export function updateUserWatchStatistics(data) {
+  return request({
+    url: '/course/userWatchStatistics',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除会员看课统计-按营期统计
+export function delUserWatchStatistics(id) {
+  return request({
+    url: '/course/userWatchStatistics/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出会员看课统计-按营期统计
+export function exportUserWatchStatistics(query) {
+  return request({
+    url: '/course/userWatchStatistics/export',
+    method: 'get',
+    params: query
+  })
+}

+ 19 - 0
src/api/store/storeOrderAudit.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取审核列表
+export const list = (query) => {
+  return request({
+    url: '/store/storeOrderAudit/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 审核
+export const audit = (data) => {
+  return request({
+    url: '/store/storeOrderAudit/audit',
+    method: 'post',
+    data: data
+  })
+}

二进制
src/assets/logo/bly_logo.png


二进制
src/assets/logo/fby_logo.png


+ 3 - 4
src/views/course/userCoursePeriod/batchRedPacket.vue

@@ -24,7 +24,7 @@
         align="center"
       />
       <el-table-column
-        label="金额(0.1-0.3元)"
+        label="金额"
         align="center"
         width="200"
       >
@@ -32,7 +32,6 @@
           <el-input-number
             v-model="scope.row.amount"
             :min="0.1"
-            :max="0.3"
             :precision="2"
             :step="0.01"
             size="small"
@@ -96,9 +95,9 @@ export default {
     // 保存
     handleSave() {
       // 验证金额范围
-      const invalidItems = this.tableData.filter(item => item.amount < 0.1 || item.amount > 0.3);
+      const invalidItems = this.tableData.filter(item => item.amount < 0.1);
       if (invalidItems.length > 0) {
-        this.$message.error('红包金额需要在0.1元至0.3元之间');
+        this.$message.error('红包金额需要大于等于0.1元');
         return;
       }
 

+ 9 - 9
src/views/course/userCoursePeriod/index.vue

@@ -249,12 +249,12 @@
         <el-form-item label="课程LOGO" prop="courseLogo">
           <image-upload v-model="form.courseLogo" :limit="1" />
         </el-form-item>
-        <el-form-item label="红包发放方式" prop="redPacketGrantMethod">
-          <el-radio-group v-model="form.redPacketGrantMethod">
-            <el-radio :label="1" >按课程</el-radio>
-            <el-radio :label="2" >按营期</el-radio>
-          </el-radio-group>
-        </el-form-item>
+<!--        <el-form-item label="红包发放方式" prop="redPacketGrantMethod">-->
+<!--          <el-radio-group v-model="form.redPacketGrantMethod">-->
+<!--            <el-radio :label="1" >按课程</el-radio>-->
+<!--            <el-radio :label="2" >按营期</el-radio>-->
+<!--          </el-radio-group>-->
+<!--        </el-form-item>-->
         <el-form-item label="营期类型" prop="periodType">
           <el-radio-group v-model="form.periodType">
             <el-radio :label="1" >多课程</el-radio>
@@ -686,9 +686,9 @@ export default {
         courseStyle: [
           { required: true, message: '课程风格不能为空', trigger: 'change' }
         ],
-        redPacketGrantMethod: [
-          { required: true, message: '红包发放方式不能为空', trigger: 'change' }
-        ],
+        // redPacketGrantMethod: [
+        //   { required: true, message: '红包发放方式不能为空', trigger: 'change' }
+        // ],
         periodType: [
           { required: true, message: '营期类型不能为空', trigger: 'change' }
         ],

+ 3 - 4
src/views/course/userCoursePeriod/redPacket.vue

@@ -27,12 +27,11 @@
         <el-table-column label="课程" prop="courseName" align="center" />
         <el-table-column label="小节" prop="videoName" align="center" />
         <el-table-column label="营期日期" prop="dayDate" align="center"/>
-        <el-table-column label="红包金额(0.1-0.3元)" width="200px" align="center">
+        <el-table-column label="红包金额" width="200px" align="center">
           <template slot-scope="scope">
             <el-input-number
               v-model="scope.row.amount"
               :min="0.1"
-              :max="0.3"
               :precision="2"
               :step="0.01"
               size="small"
@@ -145,9 +144,9 @@ export default {
       }
 
       // 验证金额范围
-      const invalidItems = validAmountItems.filter(item => item.amount < 0.1 || item.amount > 0.3);
+      const invalidItems = validAmountItems.filter(item => item.amount < 0.1);
       if (invalidItems.length > 0) {
-        this.$message.error('红包金额需要在0.1元至0.3元之间');
+        this.$message.error('红包金额需要大于等于0.1元');
         return;
       }
 

+ 389 - 0
src/views/course/userWatchCourseStatistics/index.vue

@@ -0,0 +1,389 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="营期名称" prop="periodName">
+        <el-input
+          v-model="queryParams.periodName"
+          placeholder="请输入营期名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="营期日期" prop="periodStartingTime">
+        <el-date-picker clearable size="small"
+                        v-model="queryParams.periodStartingTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择营期开始日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="播出时间" prop="courseStartDateTime">
+        <el-date-picker clearable size="small"
+                        v-model="queryParams.courseStartDateTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择课程开始日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="课程名称" prop="courseName">
+        <el-input
+          v-model="queryParams.courseName"
+          placeholder="请输入课程名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="销售公司" prop="companyName">
+        <el-input
+          v-model="queryParams.companyName"
+          placeholder="请输入销售公司名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="所属销售" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入销售名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['course:userWatchCourseStatistics:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="userWatchCourseStatisticsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="营期名称" align="center" prop="periodName" />
+      <el-table-column label="营期日期" align="center" prop="periodStartingTime" />
+      <el-table-column label="播出时间" align="center" prop="courseStartDateTime" />
+      <el-table-column label="课程名称" align="center" prop="courseName" />
+      <el-table-column label="视频小节" align="center" prop="videoTitle" />
+      <el-table-column label="销售公司" align="center" prop="companyName" />
+      <el-table-column label="所属销售" align="center" prop="companyUserName" />
+      <el-table-column label="新增会员" align="center" prop="newUserNum" />
+      <el-table-column label="会员数量" align="center" prop="userNum" />
+      <el-table-column label="观看人数" align="center" prop="watchNum" />
+      <el-table-column label="完播人数" align="center" prop="completeWatchNum" />
+      <el-table-column label="完播率" align="center" prop="completeWatchRate" />
+      <el-table-column label="答题人数" align="center" prop="answerNum" />
+      <el-table-column label="正确人数" align="center" prop="answerRightNum" />
+      <el-table-column label="正确率" align="center" prop="answerRightRate" />
+      <el-table-column label="红包领取个数" align="center" prop="redPacketNum" />
+      <el-table-column label="红包领取总额" align="center" prop="redPacketAmount" />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改会员看课统计-按课程统计对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="营期id" prop="periodId">
+          <el-input v-model="form.periodId" placeholder="请输入营期id" />
+        </el-form-item>
+        <el-form-item label="营期名称" prop="periodName">
+          <el-input v-model="form.periodName" placeholder="请输入营期名称" />
+        </el-form-item>
+        <el-form-item label="课程id" prop="courseId">
+          <el-input v-model="form.courseId" placeholder="请输入课程id" />
+        </el-form-item>
+        <el-form-item label="课程名称" prop="courseName">
+          <el-input v-model="form.courseName" placeholder="请输入课程名称" />
+        </el-form-item>
+        <el-form-item label="视频id" prop="videoId">
+          <el-input v-model="form.videoId" placeholder="请输入视频id" />
+        </el-form-item>
+        <el-form-item label="视频标题" prop="videoTitle">
+          <el-input v-model="form.videoTitle" placeholder="请输入视频标题" />
+        </el-form-item>
+        <el-form-item label="销售公司id" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入销售公司id" />
+        </el-form-item>
+        <el-form-item label="销售公司名称" prop="companyName">
+          <el-input v-model="form.companyName" placeholder="请输入销售公司名称" />
+        </el-form-item>
+        <el-form-item label="销售id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入销售id" />
+        </el-form-item>
+        <el-form-item label="课程开始日期" prop="courseStartDateTime">
+          <el-date-picker clearable size="small"
+            v-model="form.courseStartDateTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择课程开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="销售名称" prop="companyUserName">
+          <el-input v-model="form.companyUserName" placeholder="请输入销售名称" />
+        </el-form-item>
+        <el-form-item label="营期开始日期" prop="periodStartingTime">
+          <el-date-picker clearable size="small"
+            v-model="form.periodStartingTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择营期开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="新增会员数量" prop="newUserNum">
+          <el-input v-model="form.newUserNum" placeholder="请输入新增会员数量" />
+        </el-form-item>
+        <el-form-item label="会员数量" prop="userNum">
+          <el-input v-model="form.userNum" placeholder="请输入会员数量" />
+        </el-form-item>
+        <el-form-item label="观看人数" prop="watchNum">
+          <el-input v-model="form.watchNum" placeholder="请输入观看人数" />
+        </el-form-item>
+        <el-form-item label="完播人数" prop="completeWatchNum">
+          <el-input v-model="form.completeWatchNum" placeholder="请输入完播人数" />
+        </el-form-item>
+        <el-form-item label="完播率" prop="completeWatchRate">
+          <el-input v-model="form.completeWatchRate" placeholder="请输入完播率" />
+        </el-form-item>
+        <el-form-item label="答题人数" prop="answerNum">
+          <el-input v-model="form.answerNum" placeholder="请输入答题人数" />
+        </el-form-item>
+        <el-form-item label="答题正确人数" prop="answerRightNum">
+          <el-input v-model="form.answerRightNum" placeholder="请输入答题正确人数" />
+        </el-form-item>
+        <el-form-item label="答题正确率" prop="answerRightRate">
+          <el-input v-model="form.answerRightRate" placeholder="请输入答题正确率" />
+        </el-form-item>
+        <el-form-item label="红包领取个数" prop="redPacketNum">
+          <el-input v-model="form.redPacketNum" placeholder="请输入红包领取数量" />
+        </el-form-item>
+        <el-form-item label="红包领取总额" prop="redPacketAmount">
+          <el-input v-model="form.redPacketAmount" placeholder="请输入红包领取总额" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listUserWatchCourseStatistics, getUserWatchCourseStatistics, delUserWatchCourseStatistics, addUserWatchCourseStatistics, updateUserWatchCourseStatistics, exportUserWatchCourseStatistics } from "@/api/course/userWatchCourseStatistics";
+
+export default {
+  name: "UserWatchCourseStatistics",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 会员看课统计-按课程统计表格数据
+      userWatchCourseStatisticsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        periodId: null,
+        periodName: null,
+        courseId: null,
+        courseName: null,
+        videoId: null,
+        videoTitle: null,
+        companyId: null,
+        companyName: null,
+        companyUserId: null,
+        courseStartDateTime: null,
+        companyUserName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null,
+        answerNum: null,
+        answerRightNum: null,
+        answerRightRate: null,
+        redPacketNum: null,
+        redPacketAmount: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询会员看课统计-按课程统计列表 */
+    getList() {
+      this.loading = true;
+      listUserWatchCourseStatistics(this.queryParams).then(response => {
+        this.userWatchCourseStatisticsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        periodId: null,
+        periodName: null,
+        courseId: null,
+        courseName: null,
+        videoId: null,
+        videoTitle: null,
+        companyId: null,
+        companyName: null,
+        companyUserId: null,
+        courseStartDateTime: null,
+        companyUserName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null,
+        answerNum: null,
+        answerRightNum: null,
+        answerRightRate: null,
+        redPacketNum: null,
+        redPacketAmount: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加会员看课统计-按课程统计";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getUserWatchCourseStatistics(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改会员看课统计-按课程统计";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateUserWatchCourseStatistics(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addUserWatchCourseStatistics(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除会员看课统计-按课程统计编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delUserWatchCourseStatistics(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出当前数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportUserWatchCourseStatistics(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 385 - 0
src/views/course/userWatchCourseTotalStatistics/index.vue

@@ -0,0 +1,385 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="营期名称" prop="periodName">
+        <el-input
+          v-model="queryParams.periodName"
+          placeholder="请输入营期名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="营期日期" prop="periodStartingTime">
+        <el-date-picker clearable size="small"
+                        v-model="queryParams.periodStartingTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择营期开始日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="播出时间" prop="courseStartDateTime">
+        <el-date-picker clearable size="small"
+                        v-model="queryParams.courseStartDateTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择课程开始日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="课程名称" prop="courseName">
+        <el-input
+          v-model="queryParams.courseName"
+          placeholder="请输入课程名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="销售公司" prop="companyName">
+        <el-input
+          v-model="queryParams.companyName"
+          placeholder="请输入销售公司名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="所属销售" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入销售名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['course:userWatchCourseStatistics:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="userWatchCourseStatisticsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="营期名称" align="center" prop="periodName" />
+      <el-table-column label="营期日期" align="center" prop="periodStartingTime" />
+      <el-table-column label="播出时间" align="center" prop="courseStartDateTime" />
+      <el-table-column label="课程名称" align="center" prop="courseName" />
+      <el-table-column label="视频小节" align="center" prop="videoTitle" />
+      <el-table-column label="销售公司" align="center" prop="companyName" />
+      <el-table-column label="所属销售" align="center" prop="companyUserName" />
+      <el-table-column label="新增会员" align="center" prop="newUserNum" />
+      <el-table-column label="会员数量" align="center" prop="userNum" />
+      <el-table-column label="观看人数" align="center" prop="watchNum" />
+      <el-table-column label="完播人数" align="center" prop="completeWatchNum" />
+      <el-table-column label="完播率" align="center" prop="completeWatchRate" />
+      <el-table-column label="红包领取个数" align="center" prop="redPacketNum" />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改会员看课统计-按课程统计对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="营期id" prop="periodId">
+          <el-input v-model="form.periodId" placeholder="请输入营期id" />
+        </el-form-item>
+        <el-form-item label="营期名称" prop="periodName">
+          <el-input v-model="form.periodName" placeholder="请输入营期名称" />
+        </el-form-item>
+        <el-form-item label="课程id" prop="courseId">
+          <el-input v-model="form.courseId" placeholder="请输入课程id" />
+        </el-form-item>
+        <el-form-item label="课程名称" prop="courseName">
+          <el-input v-model="form.courseName" placeholder="请输入课程名称" />
+        </el-form-item>
+        <el-form-item label="视频id" prop="videoId">
+          <el-input v-model="form.videoId" placeholder="请输入视频id" />
+        </el-form-item>
+        <el-form-item label="视频标题" prop="videoTitle">
+          <el-input v-model="form.videoTitle" placeholder="请输入视频标题" />
+        </el-form-item>
+        <el-form-item label="销售公司id" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入销售公司id" />
+        </el-form-item>
+        <el-form-item label="销售公司名称" prop="companyName">
+          <el-input v-model="form.companyName" placeholder="请输入销售公司名称" />
+        </el-form-item>
+        <el-form-item label="销售id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入销售id" />
+        </el-form-item>
+        <el-form-item label="课程开始日期" prop="courseStartDateTime">
+          <el-date-picker clearable size="small"
+            v-model="form.courseStartDateTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择课程开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="销售名称" prop="companyUserName">
+          <el-input v-model="form.companyUserName" placeholder="请输入销售名称" />
+        </el-form-item>
+        <el-form-item label="营期开始日期" prop="periodStartingTime">
+          <el-date-picker clearable size="small"
+            v-model="form.periodStartingTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择营期开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="新增会员数量" prop="newUserNum">
+          <el-input v-model="form.newUserNum" placeholder="请输入新增会员数量" />
+        </el-form-item>
+        <el-form-item label="会员数量" prop="userNum">
+          <el-input v-model="form.userNum" placeholder="请输入会员数量" />
+        </el-form-item>
+        <el-form-item label="观看人数" prop="watchNum">
+          <el-input v-model="form.watchNum" placeholder="请输入观看人数" />
+        </el-form-item>
+        <el-form-item label="完播人数" prop="completeWatchNum">
+          <el-input v-model="form.completeWatchNum" placeholder="请输入完播人数" />
+        </el-form-item>
+        <el-form-item label="完播率" prop="completeWatchRate">
+          <el-input v-model="form.completeWatchRate" placeholder="请输入完播率" />
+        </el-form-item>
+        <el-form-item label="答题人数" prop="answerNum">
+          <el-input v-model="form.answerNum" placeholder="请输入答题人数" />
+        </el-form-item>
+        <el-form-item label="答题正确人数" prop="answerRightNum">
+          <el-input v-model="form.answerRightNum" placeholder="请输入答题正确人数" />
+        </el-form-item>
+        <el-form-item label="答题正确率" prop="answerRightRate">
+          <el-input v-model="form.answerRightRate" placeholder="请输入答题正确率" />
+        </el-form-item>
+        <el-form-item label="红包领取个数" prop="redPacketNum">
+          <el-input v-model="form.redPacketNum" placeholder="请输入红包领取数量" />
+        </el-form-item>
+        <el-form-item label="红包领取总额" prop="redPacketAmount">
+          <el-input v-model="form.redPacketAmount" placeholder="请输入红包领取总额" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listUserWatchCourseStatistics, getUserWatchCourseStatistics, delUserWatchCourseStatistics, addUserWatchCourseStatistics, updateUserWatchCourseStatistics, exportUserWatchCourseStatisticsTotal } from "@/api/course/userWatchCourseStatistics";
+
+export default {
+  name: "UserWatchCourseStatistics",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 会员看课统计-按课程统计表格数据
+      userWatchCourseStatisticsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        periodId: null,
+        periodName: null,
+        courseId: null,
+        courseName: null,
+        videoId: null,
+        videoTitle: null,
+        companyId: null,
+        companyName: null,
+        companyUserId: null,
+        courseStartDateTime: null,
+        companyUserName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null,
+        answerNum: null,
+        answerRightNum: null,
+        answerRightRate: null,
+        redPacketNum: null,
+        redPacketAmount: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询会员看课统计-按课程统计列表 */
+    getList() {
+      this.loading = true;
+      listUserWatchCourseStatistics(this.queryParams).then(response => {
+        this.userWatchCourseStatisticsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        periodId: null,
+        periodName: null,
+        courseId: null,
+        courseName: null,
+        videoId: null,
+        videoTitle: null,
+        companyId: null,
+        companyName: null,
+        companyUserId: null,
+        courseStartDateTime: null,
+        companyUserName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null,
+        answerNum: null,
+        answerRightNum: null,
+        answerRightRate: null,
+        redPacketNum: null,
+        redPacketAmount: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加会员看课统计-按课程统计";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getUserWatchCourseStatistics(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改会员看课统计-按课程统计";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateUserWatchCourseStatistics(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addUserWatchCourseStatistics(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除会员看课统计-按课程统计编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delUserWatchCourseStatistics(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出当前数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportUserWatchCourseStatisticsTotal(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 274 - 0
src/views/course/userWatchStatistics/index.vue

@@ -0,0 +1,274 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="营期名称" prop="periodName">
+        <el-input
+          v-model="queryParams.periodName"
+          placeholder="请输入营期名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="营期日期" prop="periodStartingTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.periodStartingTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择营期开始日期">
+        </el-date-picker>
+      </el-form-item>
+
+
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['course:userWatchStatistics:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="userWatchStatisticsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="营期名称" align="center" prop="periodName" />
+      <el-table-column label="营期开始日期" align="center" prop="periodStartingTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.periodStartingTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="新增会员" align="center" prop="newUserNum" />
+      <el-table-column label="会员数量" align="center" prop="userNum" />
+      <el-table-column label="观看人数" align="center" prop="watchNum" />
+      <el-table-column label="完播人数" align="center" prop="completeWatchNum" />
+      <el-table-column label="完播率" align="center" prop="completeWatchRate" />
+
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改会员看课统计-按营期统计对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="营期id" prop="periodId">
+          <el-input v-model="form.periodId" placeholder="请输入营期id" />
+        </el-form-item>
+        <el-form-item label="营期名称" prop="periodName">
+          <el-input v-model="form.periodName" placeholder="请输入营期名称" />
+        </el-form-item>
+        <el-form-item label="营期开始日期" prop="periodStartingTime">
+          <el-date-picker clearable size="small"
+            v-model="form.periodStartingTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择营期开始日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="新增会员数量" prop="newUserNum">
+          <el-input v-model="form.newUserNum" placeholder="请输入新增会员数量" />
+        </el-form-item>
+        <el-form-item label="会员数量" prop="userNum">
+          <el-input v-model="form.userNum" placeholder="请输入会员数量" />
+        </el-form-item>
+        <el-form-item label="观看人数" prop="watchNum">
+          <el-input v-model="form.watchNum" placeholder="请输入观看人数" />
+        </el-form-item>
+        <el-form-item label="完播人数" prop="completeWatchNum">
+          <el-input v-model="form.completeWatchNum" placeholder="请输入完播人数" />
+        </el-form-item>
+        <el-form-item label="完播率" prop="completeWatchRate">
+          <el-input v-model="form.completeWatchRate" placeholder="请输入完播率" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listUserWatchStatistics, getUserWatchStatistics, delUserWatchStatistics, addUserWatchStatistics, updateUserWatchStatistics, exportUserWatchStatistics } from "@/api/course/userWatchStatistics";
+
+export default {
+  name: "UserWatchStatistics",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 会员看课统计-按营期统计表格数据
+      userWatchStatisticsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        periodId: null,
+        periodName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询会员看课统计-按营期统计列表 */
+    getList() {
+      this.loading = true;
+      listUserWatchStatistics(this.queryParams).then(response => {
+        this.userWatchStatisticsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        periodId: null,
+        periodName: null,
+        periodStartingTime: null,
+        newUserNum: null,
+        userNum: null,
+        watchNum: null,
+        completeWatchNum: null,
+        completeWatchRate: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加会员看课统计-按营期统计";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getUserWatchStatistics(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改会员看课统计-按营期统计";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateUserWatchStatistics(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addUserWatchStatistics(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除会员看课统计-按营期统计编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delUserWatchStatistics(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出当前数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportUserWatchStatistics(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 3 - 3
src/views/course/videoResource/index.vue

@@ -107,7 +107,7 @@
           </a>
         </template>
       </el-table-column>
-      <el-table-column label="CDN" align="center">
+      <!-- <el-table-column label="CDN" align="center">
         <template slot-scope="scope">
           <a
             @click="copy(scope.row.videoUrl)"
@@ -115,7 +115,7 @@
             复制链接
           </a>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="关联题目" align="center">
         <template slot-scope="scope">
           <a
@@ -301,7 +301,7 @@
       class="video-preview-dialog"
       :modal-append-to-body="false"
       :before-close="handleCloseVideoPreview">
-      <video ref="up-video" id="video" width="100%" height="400px" controls :src="videoPreviewUrl" />
+      <video ref="up-video" id="video" width="100%" height="400px" :src="videoPreviewUrl" controls disablepictureinpicture controlsList="nodownload nofullscreen nopictureinpicture" />
     </el-dialog>
 
     <!-- 批量选择视频弹窗 -->

+ 4 - 4
src/views/index.vue

@@ -75,12 +75,12 @@
               <span>今日消耗</span>
             </div>
             <div class="card-value highlight">
-              <count-to :start-val="0" :end-val="todayComsumption" :duration="3600" class="card-panel-num" />
+              {{todayComsumption?todayComsumption.toFixed(2):'0.00'}}
             </div>
             <div class="card-sub">
               <span>昨日消耗(元)</span>
               <span class="sub-value">
-                <count-to :start-val="0" :end-val="yesterdayComsumption" :duration="3600" class="card-panel-num" />
+                {{yesterdayComsumption?yesterdayComsumption.toFixed(2):'0.00'}}
               </span>
             </div>
             <el-progress :percentage="percentage" :show-text="false" color="#409EFF"></el-progress>
@@ -241,12 +241,12 @@
               <div class="card-icon"><i class="el-icon-video-play"></i></div>
               <div class="card-content">
                 <div class="card-row">
-                  <span>观看数</span>
+                  <span>观看数</span>
                   <span class="highlight">
                     <count-to :start-val="0" :end-val="watchCount" :duration="3600" class="card-panel-num" /></span>
                 </div>
                 <div class="card-row">
-                  <span>完播数</span>
+                  <span>完播数</span>
                   <span class="highlight">
                     <count-to :start-val="0" :end-val="completedCount" :duration="3600" class="card-panel-num" />
                   </span>

+ 3 - 3
src/views/store/components/productAfterSalesOrder.vue

@@ -136,12 +136,12 @@
           </el-table-column>
           <el-table-column label="数量" width="180" align="center">
             <template slot-scope="scope">
-                {{JSON.parse(scope.row.jsonInfo).num}}
+                {{scope.row.num}}
             </template>
           </el-table-column>
           <el-table-column label="小计"  align="center">
             <template slot-scope="scope">
-              ¥{{JSON.parse(scope.row.jsonInfo).num*JSON.parse(scope.row.jsonInfo).price}}
+              ¥{{scope.row.num*JSON.parse(scope.row.jsonInfo).price}}
             </template>
           </el-table-column>
         </el-table>
@@ -174,7 +174,7 @@
     <el-dialog :title="audit.title" :visible.sync="audit.open" width="800px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="退款金额" prop="refundAmount"  >
-          <el-input-number disabled v-model="form.refundAmount" :min="0"  />
+          <el-input-number v-model="form.refundAmount" :min="0"  />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 28 - 9
src/views/store/components/productOrder.vue

@@ -164,7 +164,7 @@
           凭证信息
         </span>
       </div>
-      <el-image 
+      <el-image
           v-if="certificates != null"
           :src="certificates"
           :preview-src-list="[certificates]"
@@ -290,7 +290,7 @@
           <el-table-column label="支付时间" align="center" prop="payTime" />
       </el-table>
 
-      
+
       <div style="margin-top: 20px">
         <span class="font-small">操作信息</span>
       </div>
@@ -324,6 +324,23 @@
           <el-table-column label="创建时间" align="center" prop="createTime" />
           <el-table-column label="备注" align="center" prop="remark" />
       </el-table>
+
+        <div style="margin-top: 20px">
+          <span class="font-small">审批信息</span>
+        </div>
+        <el-table style="margin-top: 20px;width: 100%"
+                  :data="auditLogs" border>
+          <el-table-column label="操作时间"  width="160" align="center">
+            <template slot-scope="scope">
+              {{scope.row.createTime}}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" align="center">
+            <template slot-scope="scope">
+              {{scope.row.content}}
+            </template>
+          </el-table-column>
+        </el-table>
       </el-card>
     </div>
 
@@ -354,7 +371,7 @@
             <el-select filterable style="width: 200px" v-model="editForm.scheduleId" placeholder="请选择档期" clearable size="small" >
               <el-option
                       v-for="item in scheduleOptions"
-                      :key="item.id"  
+                      :key="item.id"
                       :label="item.name"
                       :value="item.id"
                     />
@@ -392,7 +409,7 @@
         <el-form-item label="物流单号" prop="deliveryId"  >
           <el-input v-model="editDyForm.deliveryId" placeholder="请输入物流单号" />
         </el-form-item>
-        
+
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
@@ -473,7 +490,7 @@
         </el-row>
       </div>
     </el-dialog>
-    
+
   </div>
 </template>
 
@@ -548,6 +565,7 @@ export default {
       payments:[],
       tuiMoneyLogs:[],
       erpOrder:null,
+      auditLogs: [],
     };
   },
   created() {
@@ -579,13 +597,13 @@ export default {
         const id = this.order.id;
         getStoreOrderAddress(id).then(response =>{
             this.order.userAddress = response.address;
-        }) 
+        })
       },
       handlePhone(){
         const id = this.order.id;
         getStoreOrderPhone(id).then(response =>{
             this.order.userPhone = response.userPhone;
-        }) 
+        })
       },
     showImageDialog() {
       this.dialogVisible = true;
@@ -777,7 +795,7 @@ export default {
         this.editForm.userAddress = this.order.userAddress.toString();
         this.editForm.scheduleId = this.order.scheduleId;
         // this.editForm.extendOrderId = this.order.extendOrderId.toString();
-        
+
     },
     //推送管易按钮
     addErpOrder(){
@@ -810,12 +828,13 @@ export default {
             }
             if(response.order.status != null){
               this.orderStatus = response.order.status;
-            }  
+            }
             this.user = response.user;
             this.logs = response.logs;
             this.items = response.items;
             this.payments=response.payments;
             this.tuiMoneyLogs=response.tuiMoneyLogs;
+            this.auditLogs = response.auditLogs;
         });
      }
   }

+ 254 - 0
src/views/store/storeOrderAudit/index.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="公司名" prop="companyId">
+        <el-select filterable  v-model="queryParams.companyId" placeholder="请选择公司名"  @change="companyChange" clearable size="small">
+          <el-option
+            v-for="item in companys"
+            :key="item.companyId"
+            :label="item.companyName"
+            :value="item.companyId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属员工" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入所属员工昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="全部" name="00"></el-tab-pane>
+      <el-tab-pane label="待销售审批" name="0"></el-tab-pane>
+      <el-tab-pane label="销售审批拒绝" name="1"></el-tab-pane>
+      <el-tab-pane label="待总后台审核" name="2"></el-tab-pane>
+      <el-tab-pane label="总后台审核拒绝" name="3"></el-tab-pane>
+      <el-tab-pane label="审核通过" name="4"></el-tab-pane>
+    </el-tabs>
+    <el-table height="500" border v-loading="loading" :data="storeOrderAuditList" :key="tableKey">
+      <el-table-column label="订单号" align="center" prop="orderCode" width="200" />
+      <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="所属员工" align="center" prop="companyUserName" />
+      <el-table-column label="审核状态" align="center" prop="status" >
+        <template slot-scope="scope">
+          <el-tag prop="status" v-for="item in statusOptions"
+                  :type="item.type"
+                  v-if="scope.row.auditStatus === item.dictValue">
+            {{item.dictLabel}}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="销售审核时间" align="center" prop="companyAuditTime" />
+      <el-table-column label="销售审核人" align="center" prop="companyAuditUserName" />
+      <el-table-column label="总后台审核时间" align="center" prop="adminAuditTime" />
+      <el-table-column label="总后台审核人" align="center" prop="adminAuditUserName" />
+      <el-table-column label="被拒原因" align="center" prop="reason" show-overflow-tooltip />
+      <el-table-column label="提交时间" align="center" prop="createTime" />
+      <el-table-column label="操作" fixed="right" align="center" width="80" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-popover
+            v-if="scope.row.auditStatus === 2"
+            placement="right"
+            trigger="click"
+            :ref="'popover_' + scope.row.id">
+            <el-button size="mini" type="success" @click="handlePass(scope.row)">通过</el-button>
+            <el-button size="mini" type="danger" @click="handleAudit(scope.row)">拒绝</el-button>
+            <el-button
+              slot="reference"
+              size="mini"
+              type="text"
+              v-hasPermi="['store:storeOrderAudit:audit']"
+            >审核订单</el-button>
+          </el-popover>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog :title="show.title" :visible.sync="show.open" width="500px" append-to-body>
+      <el-form ref="auditForm" :model="auditForm" :rules="auditRules" label-width="80px">
+        <el-form-item label="拒绝原因" prop="reviewContent">
+          <el-input
+            type="textarea"
+            v-model="auditForm.reviewContent"
+            placeholder="请输入拒绝原因"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleReject">确定</el-button>
+        <el-button @click="cancelAudit">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getCompanyList } from "@/api/company/company";
+import {list, audit} from "@/api/store/storeOrderAudit";
+
+export default {
+  name: "StoreOrderAudit",
+  data() {
+    const statusOptions = [
+      {
+        dictLabel: "待销售审批",
+        dictValue: 0,
+        type: ''
+      },
+      {
+        dictLabel: "销售审批拒绝",
+        dictValue: 1,
+        type: 'danger'
+      },
+      {
+        dictLabel: "待总后台审核",
+        dictValue: 2,
+        type: ''
+      },
+      {
+        dictLabel: "总后台审核拒绝",
+        dictValue: 3,
+        type: 'danger'
+      },
+      {
+        dictLabel: "审核通过",
+        dictValue: 4,
+        type: 'success'
+      }
+    ]
+
+    return {
+      tableKey: 0,
+      showSearch: true,
+      companys: [],
+      total: 0,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyId: null,
+        companyUserName: null,
+        auditStatus: null
+      },
+      activeName: '00',
+      loading: false,
+      storeOrderAuditList: [],
+      statusOptions: statusOptions,
+      show: {
+        open: false,
+        title: "审核订单"
+      },
+      auditForm: {
+        auditId: null,
+        reviewType: null,
+        reviewContent: ''
+      },
+      auditRules: {
+        reviewContent: [
+          { required: true, message: "请输入拒绝原因", trigger: "blur" }
+        ]
+      },
+      currentRowId: null,
+    }
+  },
+  created() {
+    this.getCompanyOptions()
+    this.handleQuery()
+  },
+  activated() {
+    this.tableKey = Date.now()
+  },
+  methods: {
+    getCompanyOptions() {
+      getCompanyList().then(response => {
+        this.companys = response.data
+      })
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    getList() {
+      this.loading = true
+      list(this.queryParams).then(response => {
+        const {rows, total} = response
+        this.storeOrderAuditList = rows
+        this.total = total
+        this.loading = false
+      })
+    },
+    handleClick(tab) {
+      this.queryParams.auditStatus = tab.name === '00' ? null : tab.name
+      this.handleQuery()
+    },
+    companyChange(val) {
+      this.queryParams.companyId = val
+    },
+    handleAudit(row) {
+      this.currentRowId = row.id
+      this.auditForm.auditId = row.id;
+      this.auditForm.reviewType = 0;
+      this.show.open = true;
+    },
+    handlePass(row) {
+      this.currentRowId = row.id
+      this.auditForm.auditId = row.id;
+      this.auditForm.reviewType = 1;
+      this.submitAudit();
+    },
+    handleReject() {
+      this.$refs["auditForm"].validate(valid => {
+        if (valid) {
+          this.submitAudit();
+        }
+      });
+    },
+    submitAudit() {
+      audit(this.auditForm).then(response => {
+        const {msg} = response
+        this.msgSuccess(msg);
+        this.show.open = false;
+        this.$refs['popover_' + this.currentRowId].doClose();
+        this.getList();
+        this.resetAuditForm();
+      });
+    },
+    cancelAudit() {
+      this.show.open = false;
+      this.resetAuditForm();
+    },
+    resetAuditForm() {
+      this.auditForm = {
+        auditId: null,
+        reviewType: null,
+        reviewContent: ''
+      };
+      this.$refs["auditForm"]?.resetFields();
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 8 - 0
src/views/system/config/config.vue

@@ -68,6 +68,14 @@
             <el-form-item label="会员海报图片" prop="userPosterImage">
               <ImageUpload v-model="form1.userPosterImage" type="image" :num="10" :width="150" :height="150" :limit="1"/>
             </el-form-item>
+            <el-form-item  label="订单审核" prop="auditSwitch">
+              <el-tooltip class="item" effect="dark" content="订单是否需要审核" placement="top-end">
+                <el-radio-group v-model="form1.auditSwitch">
+                  <el-radio :label="0">关闭</el-radio>
+                  <el-radio :label="1">开启</el-radio>
+                </el-radio-group>
+              </el-tooltip>
+            </el-form-item>
            <div   class="footer">
               <el-button type="primary" @click="submitForm1">提  交</el-button>
             </div>