Browse Source

添加功能

lex-xin 5 years ago
parent
commit
d71f44acff

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.af03610c.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c73efa16.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.028dd434.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.815909d9.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.aa1f5767.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-elementUI.abe15f16.js


+ 9 - 0
src/api/table.js

@@ -59,6 +59,15 @@ export function updateClass (data) {
   })
 }
 
+// 关闭收费通道 
+export function closeClassPay (data) {
+    return request({
+      url: '/user/closeClassPay',
+      method: 'post',
+      data
+    })
+  }
+
 // 查询学生订单
 export function checkOrderList (data) {
   return request({

+ 1 - 1
src/main.js

@@ -4,7 +4,7 @@ import 'normalize.css/normalize.css' // A modern alternative to CSS resets
 
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
-import locale from 'element-ui/lib/locale/lang/en' // lang i18n
+import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
 
 import '@/styles/index.scss' // global css
 

+ 36 - 8
src/views/dashboard/index.vue

@@ -77,11 +77,12 @@
         <!--  v-if="majorStatus == 1" -->
         <el-button type='danger'
                    icon='el-icon-position'
-                   v-show="paymentStatus"
+                   v-if="paymentStatus"
                    @click="getMoney">开启缴费</el-button>
-        <!-- <el-button type='danger'
+        <el-button type='danger'
                    icon='el-icon-position'
-                   @click="getMoney">开启缴费</el-button> -->
+                   v-if="!paymentStatus && this.majorId && this.majorStatus != 5"
+                   @click="closeClassPay">关闭缴费</el-button>
         <el-button type='warning'
                    icon="el-icon-news"
                    v-if='this.majorId'
@@ -249,7 +250,8 @@ import {
   getBranches,
   getStudentList,
   updateUser,
-  updateClass
+  updateClass,
+  closeClassPay
 } from "@/api/table";
 import { setTimeout } from "timers";
 import { rename } from 'fs';
@@ -358,14 +360,14 @@ export default {
       this.activeMarjorId = id;
       this.actionTearm = name;
       this.majorStatus = status;
-      if (status == 3 || status == 4) {
+      if (status == 3 || status == 4 || status == 5) {
         this.disabled = false;
       }
       // 判断乐团是否已经开启缴费
-      if (status == 2 || status == 3 || status == 4) {
-        this.paymentStatus = false
-      } else {
+      if (status == 1) {
         this.paymentStatus = true
+      } else {
+        this.paymentStatus = false
       }
       this.majorId = id;
       // 发请求 获取学生列表数据
@@ -457,6 +459,32 @@ export default {
     getMoney () {
       this.isDialog = true;
     },
+    closeClassPay() {
+        // 关闭缴费
+        this.$confirm('您确认关闭缴费?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+        }).then(() => {
+            closeClassPay(
+                qs.stringify({
+                    id: this.majorId
+                })
+            ).then(result => {
+                if(result.code == 200) {
+                    // this.paymentStatus = 
+                    this.$message({
+                        type: 'success',
+                        message: '关闭成功'
+                    });
+                } else {
+                    this.$message.error(result.data.msg);
+                }
+            })
+        }).catch(() => {
+                 
+        });
+    },
     handleCurrentChange (val) {
       this.page = val;
       // this.limit = pageSize;

+ 49 - 1
src/views/order/index.vue

@@ -37,6 +37,19 @@
                      value="3"></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="支付时间">
+        <el-date-picker
+            v-model="paymentTime"
+            type="datetimerange"
+            :picker-options="pickerOptions"
+            range-separator="至"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            align="right">
+        </el-date-picker>
+      </el-form-item>
       <el-button type="primary"
                  icon="el-icon-search"
                  plain
@@ -107,6 +120,34 @@ import { scrollTo } from '@/utils/scroll-to'
 export default {
   data () {
     return {
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        },
+        paymentTime: '',
       topForm: {
         team: '', 
         instruments: '', 
@@ -169,6 +210,11 @@ export default {
       });
     },
     getstudentList (callBack) {
+        let startTime = '', endTime = ''
+        if(this.paymentTime) {
+            startTime = this.paymentTime[0]
+            endTime = this.paymentTime[1]
+        }
         // this.
         // console.log(this.topForm.team)
         // console.log(this.topForm.instruments)
@@ -178,7 +224,9 @@ export default {
         checkOrderList(qs.stringify({ 
             branchId: params.team, 
             classId: params.instruments, 
-            type: params.money })).then(res => {
+            type: params.money,
+            startTime: startTime,
+            endTime: endTime})).then(res => {
             this.tableList = res.data;
             // 回调函数
             if(callBack && typeof callBack == 'function') {

Some files were not shown because too many files changed in this diff