|
@@ -4,16 +4,17 @@
|
|
|
<div class="squrt"></div>VIP课程收费设置
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
- <el-form :inline="true"
|
|
|
+ <save-form :inline="true"
|
|
|
+ ref="searchForm"
|
|
|
class="searchForm"
|
|
|
- v-model.trim="searchForm">
|
|
|
+ :model.sync="searchForm">
|
|
|
<el-form-item prop='organId'>
|
|
|
<el-select class='multiple'
|
|
|
style="width:180px!important"
|
|
|
v-model.trim="searchForm.organId"
|
|
|
filterable
|
|
|
placeholder="请选择分部">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
+ <el-option v-for="(item,index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
@@ -23,7 +24,7 @@
|
|
|
<el-button @click="search"
|
|
|
type="danger">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </save-form>
|
|
|
<div class="tableWrap">
|
|
|
<el-table :data="dataList"
|
|
|
style="width:720px;"
|
|
@@ -67,6 +68,7 @@
|
|
|
<script>
|
|
|
import { vipGroupCategory, defaultClassesUnitPrice } from '@/api/vipSeting'
|
|
|
import { getEmployeeOrgan } from '@/api/buildTeam'
|
|
|
+import { Searchs } from '@/helpers'
|
|
|
export default {
|
|
|
name: 'vipChargeSeting',
|
|
|
data () {
|
|
@@ -78,23 +80,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ async mounted () {
|
|
|
// 获取课程形态 设置vip课酬
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.organList = res.data;
|
|
|
- this.searchForm.organId = this.organList[0].id;
|
|
|
- if (this.organList[0].id) {
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- // this.getList();
|
|
|
+ // 获取分部
|
|
|
+ await this.$store.dispatch('setBranchs')
|
|
|
+ // 获取缓存的分部编号
|
|
|
+ const searchs = new Searchs(this.$route.fullPath)
|
|
|
+ const branchId = searchs.searchs[searchs.key]?.form.organId
|
|
|
+ this.searchForm.organId = branchId ? branchId : this.selects?.branchs[0]['id']
|
|
|
+ this.search()
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
search () {
|
|
|
- this.getList();
|
|
|
+ this.$refs.searchForm.validate(valid => {
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
},
|
|
|
getList () {
|
|
|
vipGroupCategory({ organId: this.searchForm.organId }).then(res => {
|