Pārlūkot izejas kodu

添加功能

1. 乐团查询添加修改
2. 订单添加分部
3. 订单添加分页功能
lex-xin 5 gadi atpakaļ
vecāks
revīzija
331f9ba61a

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.ab5612fa.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.164dd63f.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.f8bdc01e.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-libs.b0e10449.js


+ 16 - 0
src/api/table.js

@@ -39,6 +39,14 @@ export function getStudentList (data) {
   })
 }
 
+export function updateUserInfo(data) {
+    return request({
+        url: '/user/updateUser',
+        method: 'post',
+        data
+    })
+}
+
 // 修改用户信息 /updateUser
 export function updateUser (data) {
   return request({
@@ -74,4 +82,12 @@ export function checkOrderList (data) {
     method: 'POST',
     data
   })
+}
+// 查询学生订单分页接口
+export function orderListPage(data) {
+    return request({
+        url: 'order/orderListPage',
+        method: 'POST',
+        data
+    })
 }

+ 2 - 1
src/utils/request.js

@@ -81,7 +81,7 @@ service.interceptors.response.use(
     // if the custom code is not 20000, it is judged as an error.
     if (res.code !== 200) {
       Message({
-        message: res.message || 'Error',
+        message: res.msg || 'Error',
         type: 'error',
         duration: 5 * 1000
       })
@@ -100,6 +100,7 @@ service.interceptors.response.use(
       //     })
       //   }
       //   return Promise.reject(new Error(res.message || 'Error'))
+      tryHideFullScreenLoading()
     } else {
       tryHideFullScreenLoading()
       return res

+ 117 - 5
src/views/dashboard/index.vue

@@ -158,12 +158,14 @@
                            align="center"
                            label="实际缴费金额"></el-table-column>
           <el-table-column align="center"
-                           label="操作">
+                           label="操作" width="180">
             <template slot-scope="scope">
               <div>
                 <!-- 学生id crouseId subId -->
                 <el-button type="primary"
-                           plain
+                            :disabled="scope.row.status != 0 ? true : false"
+                            @click="onEdit(scope.row)">编辑</el-button>
+                <el-button type="danger"
                            :disabled='!disabled'
                            @click="showFade(scope.row.id,scope.row.courseId,scope.row.subId,scope.row.status)">调剂</el-button>
               </div>
@@ -236,7 +238,54 @@
             <el-button type="primary" @click="gotoMoneyok">确 定</el-button>
         </span>
     </el-dialog>
-
+    <!-- 学生编辑 -->
+    <el-dialog title="修改学生信息" :visible.sync="isStudent" width="30%">
+        <el-form ref="form" :model="stuForm" label-width="80px">
+            <el-form-item label="学生姓名">
+                <el-input v-model="stuForm.name"></el-input>
+            </el-form-item>
+            <el-form-item label="性别">
+                <el-select v-model="stuForm.sex" placeholder="请选择学生性别">
+                    <el-option label="男" :value="0"></el-option>
+                    <el-option label="女" :value="1"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="出生日期">
+                <el-date-picker type="date" placeholder="选择日期" v-model="stuForm.birthday" style="width: 100%;"></el-date-picker>
+            </el-form-item>
+            <el-form-item label="年级">
+                <el-select v-model="stuForm.grade" placeholder="请选择学生年级">
+                    <el-option v-for="i in stuGrade" :key="i.name" :label="i.name" :value="i.name"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="班级">
+                <el-input v-model="stuForm.gClass"></el-input>
+            </el-form-item>
+            <el-form-item label="联系方式">
+                <el-input type="number" v-model="stuForm.patriarchPhone"></el-input>
+            </el-form-item>
+            <el-form-item label="家长姓名">
+                <el-input v-model="stuForm.patriarchName"></el-input>
+            </el-form-item>
+            <el-form-item label="工作单位">
+                <el-input v-model="stuForm.patriarchUnit"></el-input>
+            </el-form-item>
+            <el-form-item label="报名状态">
+                <el-select v-model="stuForm.status" placeholder="请选择报名状态">
+                    <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 label="备注">
+                <el-input type="textarea" v-model="stuForm.remark"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" @click="onChangeStudent">确 定</el-button>
+                <el-button @click="isStudent = false">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -251,7 +300,8 @@ import {
   getStudentList,
   updateUser,
   updateClass,
-  closeClassPay
+  closeClassPay,
+  updateUserInfo
 } from "@/api/table";
 import { setTimeout } from "timers";
 import { rename } from 'fs';
@@ -292,6 +342,7 @@ export default {
       activeMarjorId: '-1', // 选中乐团的id
       studentStatus: '-1', //单个学生调剂时学生状态
       isDialog: false, // 显示隐藏弹框
+      isStudent: false, // 学生信息状态
       radio: 2, // 线上线下的选择框
       radioInstrument: 1, // 单乐器双乐器选择
       isRadioDisabled: false,
@@ -300,10 +351,71 @@ export default {
       },
       code: false,
       first: true,
-      qrcodes: ''
+      qrcodes: '',
+      stuForm: {
+          id: '',
+          name: '',
+          sex: '',
+          birthday: '',
+          grade: '',
+          gClass: '',
+          patriarchPhone: '',
+          patriarchName: '',
+          patriarchUnit: '',
+          status: '',
+          remark: '',
+      },
+      stuGrade: [
+            { name: '一年级' },
+            { name: '二年级' },
+            { name: '三年级' },
+            { name: '四年级' },
+            { name: '五年级' },
+            { name: '六年级' },
+            { name: '初一/七年级' },
+            { name: '初二/八年级' },
+            { name: '初三/九年级' },
+            { name: '高一' },
+            { name: '高二' },
+            { name: '高三' },
+        ],
     };
   },
   methods: {
+    onChangeStudent() { // 确定修改学生信息
+        // console.log(this.stuForm)
+        updateUserInfo(qs.stringify(this.stuForm))
+        .then(res => {
+            if(res.code == 200) {
+                this.isStudent = false;
+                this.$message.success(res.msg);
+                // 刷新列表
+                this.getstudentList();
+            }
+        })
+    },
+    onEdit(item) { // 编辑学生信息
+        if(!item) {
+            return false
+        }
+
+        this.stuForm = {
+            id: item.id,
+            name: item.name,
+            sex: item.sex,
+            birthday: item.birthday,
+            grade: item.grade,
+            grade: item.grade,
+            gClass: item.gClass,
+            patriarchPhone: item.patriarchPhone,
+            patriarchName: item.patriarchName,
+            patriarchUnit: item.patriarchUnit,
+            status: item.status,
+            remark: item.remark,
+        }
+
+        this.isStudent = true
+    },
     showFade (id, courseId, subId, status) {
       if (status == 1) {
         this.$message.error('此学生已报名成功,无法调剂');

+ 33 - 27
src/views/order/index.vue

@@ -64,7 +64,7 @@
     <div class="tableWrap">
       <el-table :data='tableList'
                 id='tableid'
-                height="calc(100vh - 122px)"
+                height="calc(100vh - 174px)"
                 show-summary
                 :summary-method="getSummaries">
         <el-table-column type="index"
@@ -94,6 +94,9 @@
         <el-table-column align="center"
                          label="教辅费用"
                          prop="sdFee"></el-table-column>
+        <el-table-column align="center"
+                         label="专业"
+                         prop="voicyPart"></el-table-column>
         <el-table-column align="left"
                          label="单位/学校"
                          prop="poName"></el-table-column>
@@ -103,21 +106,21 @@
                          :formatter="filterRemark">
         </el-table-column>
       </el-table>
-      <!-- <div class="paginationWrap"> -->
-      <!-- <el-pagination background
+      <div class="paginationWrap">
+      <el-pagination background
                        class="pagination"
                        layout="prev, pager, next"
                        :total="total"
                        :current-page.sync="currentPage"
-                       :page-size.sync="limit"
-                       @current-change="handleCurrentChange"></el-pagination> -->
-      <!-- </div> -->
+                       :page-size.sync="rows"
+                       @current-change="handleCurrentChange"></el-pagination>
+      </div>
 
     </div>
   </div>
 </template>
 <script>
-import { getBranches, checkOrderList, getMusicTeams } from "@/api/table";
+import { getBranches, orderListPage, getMusicTeams } from "@/api/table";
 import qs from "qs";
 import { scrollTo } from '@/utils/scroll-to'
 export default {
@@ -157,7 +160,7 @@ export default {
         money: ''
       },
       tableList: [],
-      limit: 20,
+      rows: 20,
       total: 0,
       page: 1,
       brancheList: [],// 分部列表
@@ -190,11 +193,8 @@ export default {
   methods: {
     handleCurrentChange (val) {
       this.page = val;
-      // this.limit = pageSize;
-      // this.getstudentList();
-      // if (this.autoScroll) {
-      scrollTo(0, 800);
-      // }
+    //   this.rows = pageSize;
+      this.getstudentList();
     },
     // 获取选项卡
     getBranches () {
@@ -212,25 +212,29 @@ export default {
         }
       });
     },
-    getstudentList (callBack) {
+    getstudentList (rows, callBack) {
+        if(rows && typeof rows == 'number' ) {
+            console.log(rows)
+            this.rows = rows
+        } else {
+            this.rows = 20
+        }
         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)
-        // console.log(`branchId: ${this.branchId}, classId: ${this.classId}`)
-        // return false
         let params = this.topForm
-        checkOrderList(qs.stringify({ 
+        orderListPage(qs.stringify({ 
+            page: this.page,
+            rows: this.rows,
             branchId: params.team, 
             classId: params.instruments, 
             type: params.money,
             startTime: startTime,
             endTime: endTime})).then(res => {
-            this.tableList = res.data;
+            this.tableList = res.data.rows;
+            this.total = res.data.total;
             // 回调函数
             if(callBack && typeof callBack == 'function') {
                 callBack()
@@ -255,12 +259,14 @@ export default {
         //   this.topForm.money = "";
         //   this.topForm.team = '';
         //   this.topForm.instruments = '';
-        //   this.getstudentList(() => {
-        //       setTimeout(() => {
-        //           this.method5('tableid');
-        //       }, 100);
-        //   })
-        this.method5('tableid');
+        this.rows = 9999
+        this.page = 1
+        this.getstudentList(9999, () => {
+              setTimeout(() => {
+                  this.method5('tableid');
+              }, 100);
+        })
+        // this.method5('tableid');
     },
 
     // 导出

+ 1 - 1
vue.config.js

@@ -16,7 +16,7 @@ const name = defaultSettings.title || '大雅报名管理'; // page title
 const port = process.env.port || process.env.npm_config_port || 9528; // dev port
 // const targetUrl = 'http://testpay.dayaedu.com'
 // const targetUrl = 'https://manage.dayaedu.com'
-const targetUrl = 'http://192.168.3.28:8005'
+const targetUrl = 'http://192.168.3.27:8088'
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 	/**

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels