Browse Source

提交测试

1
mo 4 năm trước cách đây
mục cha
commit
afb91f75e2
1 tập tin đã thay đổi với 46 bổ sung32 xóa
  1. 46 32
      src/views/studentManager/components/studentOrder.vue

+ 46 - 32
src/views/studentManager/components/studentOrder.vue

@@ -87,6 +87,20 @@
         <el-button native-type="submit" type="danger">搜索</el-button>
         <el-button native-type="reset" type="primary">重置</el-button>
       </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          @click="userCoursesAccountExport"
+          v-if="$helpers.permission('export/userCoursesAccount')"
+          >课程明细导出</el-button
+        >
+        <el-button
+          type="primary"
+          @click="userCashAccountDetailExport"
+          v-if="$helpers.permission('export/userCashAccountDetail')"
+          >现金明细导出</el-button
+        >
+      </el-form-item>
     </save-form>
     <div class="tableWrap">
       <el-table
@@ -160,12 +174,11 @@
           prop="memo"
           width="220px"
         >
-         <template slot-scope="scope">
-                       <overflow-text width="200px" :text="scope.row.memo"/>
-                     </template>
-        </el-table-column>
-        <el-table-column>
+          <template slot-scope="scope">
+            <overflow-text width="200px" :text="scope.row.memo" />
+          </template>
         </el-table-column>
+        <el-table-column> </el-table-column>
       </el-table>
       <pagination
         sync
@@ -180,7 +193,11 @@
       <el-row>
         <el-col :span="24">
           <el-tabs v-model="activeName" type="border-card">
-            <el-tab-pane label="账户余额明细" v-if="permission('userCashAccountDetail/queryPage')" name="first">
+            <el-tab-pane
+              label="账户余额明细"
+              v-if="permission('userCashAccountDetail/queryPage')"
+              name="first"
+            >
               <el-table :data="cashAccount.gridData">
                 <!-- 交易金额,账户可用余额,交易状态,交易类型,操作时间,备注 -->
                 <el-table-column
@@ -225,7 +242,11 @@
                 @pagination="getCashAccount"
               />
             </el-tab-pane>
-            <el-tab-pane label="课程余额明细" v-if="permission('userCoursesAccount/queryPage')" name="second">
+            <el-tab-pane
+              label="课程余额明细"
+              v-if="permission('userCoursesAccount/queryPage')"
+              name="second"
+            >
               <el-table :data="courseAccount.gridData">
                 <!-- 交易金额,账户可用余额,交易状态,交易类型,操作时间,备注 -->
                 <el-table-column
@@ -327,6 +348,7 @@
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
+import { Export } from "@/utils/downLoadFile";
 import {
   studentPaymentOrderList,
   getUserCashAccountBaseInfo,
@@ -654,32 +676,24 @@ export default {
         paymentType: null,
         remark: null,
       };
-      this.getList()
+      this.getList();
+    },
+    userCoursesAccountExport() {
+       Export(this, {
+          url: '/api-web/export/userCoursesAccount',
+          fileName: '学员课程明细.xls',
+          method: 'post',
+          params: { userId: this.$route.query.userId }
+        }, '您确定导出学员课程明细?')
+    },
+    userCashAccountDetailExport() {
+           Export(this, {
+          url: '/api-web/export/userCashAccountDetail',
+          fileName: '学员现金明细.xls',
+          method: 'post',
+          params: { userId: this.$route.query.userId }
+        }, '您确定导出学员现金明细?')
     },
-    // submitRecharge() {
-    //   let money = parseFloat(
-    //     this.dataInfo.courseBalance - this.rechargeForm.money
-    //   ).toFixed(2);
-    //   // if(this.rechargeForm)
-    //   if (money < 0) {
-    //     this.$message.error("余额不足");
-    //     return;
-    //   }
-    //   if (!this.rechargeForm.money) {
-    //     this.$message.error("请输入金额");
-    //     return;
-    //   }
-    //   transferCourseBalanceToBalance({
-    //     userId: this.searchForm.studentId,
-    //     money: this.rechargeForm.money,
-    //   }).then((res) => {
-    //     if (res.code == 200) {
-    //       this.$message.success("充值成功");
-    //       this.rechargeVisible = false;
-    //       this.__init();
-    //     }
-    //   });
-    // },
   },
 };
 </script>