|
@@ -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];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|