mo 5 år sedan
förälder
incheckning
9b16859295

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/index.html


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/css/app.9511ab58.css


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.555a0bd6.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/static/js/app.94117421.js


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

@@ -376,14 +376,26 @@ export default {
     },
     // 点击开始缴费 1报名中,2缴费中,3报名截止,4已开团
     getMoney () {
-      updateClass(qs.stringify({ id: this.majorId })).then(res => {
-        if (res.code == 200) {
-          this.$message.success("乐团报名成功请尽快缴费");
-          setTimeout(() => {
-            this.getstudentList();
-          }, 1000);
-        }
-      });
+      // 开启缴费按钮 新增配置短信文案参数 smsMsg
+      this.$prompt('请输入短信模板', '提示', {
+        confirmButtonText: '确定',
+        inputType: 'textarea',
+        showCancelButton: false,
+        inputPattern: /\S/,
+        inputErrorMessage: '短信模板不能为空'
+      }).then(({ value }) => {
+        updateClass(qs.stringify({ id: this.majorId, smsMsg: value })).then(res => {
+          if (res.code == 200) {
+            this.$message.success("乐团报名成功请尽快缴费");
+            setTimeout(() => {
+              this.getstudentList();
+              this.majorStatus = 2;
+            }, 1000);
+          } else {
+            this.$message.error(res.msg)
+          }
+        });
+      })
     },
     handleCurrentChange (val) {
       this.page = val;

+ 77 - 16
src/views/order/index.vue

@@ -2,17 +2,28 @@
   <div class='container'>
     <el-form :inline="true"
              v-model="topForm">
-      <el-form-item label="乐团">
-        <el-select v-model="topForm.team"
+      <el-form-item label="乐团"
+                    v-if='brancheList.length >0'>
+        <!-- <el-select v-model="topForm.team"
                    placeholder="请选择乐团名称">
           <el-option v-for='(item,index) in brancheList'
                      :key='index'
                      :label="item.branchName"
                      :value="item.branchId"></el-option>
-        </el-select>
+        </el-select> -->
+        <!-- :props='props' -->
+        <el-cascader :options="brancheList"
+                     clearable
+                     placeholder="请选择分部已经乐团"
+                     v-model="topForm.team"
+                     :props='props'
+                     @active-item-change="handleItemChange"
+                     @change="handleChange">
+        </el-cascader>
       </el-form-item>
       <el-form-item label="收费类型">
         <el-select v-model="topForm.money"
+                   clearable
                    placeholder="请选择收费类型">
           <el-option label="乐团报名"
                      value="1"></el-option>
@@ -52,12 +63,8 @@
                          label="到账时间"
                          prop='payTime'></el-table-column>
         <el-table-column align="center"
-                         label="备注">
-          <template slot-scope="scope">
-            <div>
-              {{scope.row.remark?scope.row.remark:'' +' '+scope.row.sdName?scope.row.sdName:''}}
-            </div>
-          </template>
+                         label="备注"
+                         :formatter="filterRemark">
         </el-table-column>
         <el-table-column align="center"
                          label="课程费用"
@@ -82,14 +89,14 @@
   </div>
 </template>
 <script>
-import { getBranches, checkOrderList } from "@/api/table";
+import { getBranches, checkOrderList, getMusicTeams } from "@/api/table";
 import qs from "qs";
 import { scrollTo } from '@/utils/scroll-to'
 export default {
   data () {
     return {
       topForm: {
-        team: '',
+        team: [],
         money: ''
       },
       tableList: [],
@@ -98,7 +105,14 @@ export default {
       page: 1,
       brancheList: [],
       idTmr: '',
-      tableId: ''
+      tableId: '',
+      props: {
+        value: 'value',
+        label: 'label',
+        children: 'children'
+      },//cascader 数据格式化
+      branchId: '',
+      classId: ''
     }
   },
   computed: {
@@ -128,22 +142,39 @@ export default {
     getBranches () {
       getBranches().then(res => {
         if (res.code == 200) {
-          this.brancheList = res.data;
-          // console.log(this.brancheList)
+          let arr = [];
+          res.data.map(item => {
+            arr.push({
+              value: item.branchId,
+              label: item.branchName,
+              children: []
+            })
+          })
+          // console.log(arr)
+          this.brancheList = arr
+
         }
       });
     },
     getstudentList () {
-      checkOrderList(qs.stringify({ classId: this.topForm.team, type: this.topForm.money })).then(res => {
+      // this.
+      checkOrderList(qs.stringify({ branchId: this.branchId, classId: this.classId, type: this.topForm.money })).then(res => {
         this.tableList = res.data;
       })
     },
     resetStudentList () {
-      this.topForm.team = "";
+      this.branchId = "";
+      this.classId = '';
       this.topForm.money = "";
+      this.topForm.team = [];
       this.page = 1;
       this.getstudentList();
     },
+    filterRemark (val) {
+      let remark = val.remark ? val.remark : '';
+      let sdName = val.sdName ? val.sdName : '';
+      return remark + ' ' + sdName;
+    },
     exportis () {
       // var curTbl = document.getElementById('tableid');
       // this.tableId = curTbl;
@@ -230,6 +261,36 @@ export default {
 
         // }
       })()
+    },
+    // 多选框选项卡
+    handleItemChange (val) {
+      // 发请求 获取分部下的乐团
+      getMusicTeams({ branchId: val }).then(res => {
+        // res.data.rows
+        // 1.格式化数据
+        // 2.追加数据到相应的位置 
+        if (res.code == 200) {
+          let arr = [];
+          res.data.rows.map(item => {
+            arr.push({
+              label: item.name,
+              value: item.id
+            })
+          })
+          for (let item in this.brancheList) {
+            if (this.brancheList[item].value == val) {
+              this.brancheList[item].children = arr;
+            }
+          }
+        }
+
+      })
+    },
+    handleChange (val) {
+      if (val) {
+        this.branchId = val[0];
+        this.classId = val[1];
+      }
     }
   }
 }

+ 2 - 2
vue.config.js

@@ -44,14 +44,14 @@ module.exports = {
       // http://192.168.3.28:8005
       // 192.168.3.38:8088
       '/order': {
-        target: `http://admin.dayaedu.com`,
+        target: `http://192.168.3.38:9000`,
         changeOrigin: true,
         pathRewrite: {
           "^order": ''
         }
       },
       '/user': {
-        target: `http://admin.dayaedu.com`,
+        target: `http://192.168.3.38:9000`,
         changeOrigin: true,
         pathRewrite: {
           "^user": ''

Vissa filer visades inte eftersom för många filer har ändrats