|
@@ -5,10 +5,8 @@
|
|
|
</h2>
|
|
|
|
|
|
<div class="m-core">
|
|
|
- <div class="newBand"
|
|
|
- v-permission="'/vipNewActive'"
|
|
|
- @click="gotoNewActive">新建</div>
|
|
|
- <el-form :inline="true"
|
|
|
+ <el-button type="primary" style="margin-bottom: 20px" v-permission="'/vipNewActive'" @click="gotoNewActive">新建</el-button>
|
|
|
+ <save-form :inline="true"
|
|
|
class="searchForm"
|
|
|
ref='searchForm'
|
|
|
:model="searchForm">
|
|
@@ -23,7 +21,7 @@
|
|
|
v-model.trim="searchForm.organId"
|
|
|
clearable
|
|
|
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>
|
|
@@ -44,13 +42,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="search"
|
|
|
- type="danger">搜索</el-button>
|
|
|
+ type="primary">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type='primary'
|
|
|
+ <el-button type='danger'
|
|
|
@click="onReset">重置</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </save-form>
|
|
|
<div class="tableWrap">
|
|
|
<el-table :data="tableList"
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
@@ -59,7 +57,11 @@
|
|
|
label="活动编号"></el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
prop="name"
|
|
|
- label="活动名称"></el-table-column>
|
|
|
+ label="活动名称">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <tooltip :content="scope.row.name"></tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
prop="vipGroupCategoryNames"
|
|
|
label="适用课程形式"></el-table-column>
|
|
@@ -150,8 +152,8 @@
|
|
|
@pagination="getList" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog title="活动详情"
|
|
|
- width="60%"
|
|
|
+ <el-dialog title="修改VIP活动"
|
|
|
+ width="650px"
|
|
|
:before-close="closeVipform"
|
|
|
:visible.sync="dialogVisible">
|
|
|
<div>
|
|
@@ -161,19 +163,20 @@
|
|
|
:rules="resetFormRules"
|
|
|
class="vipform">
|
|
|
<el-form-item label="活动名称"
|
|
|
+ label-width="120px"
|
|
|
prop="name">
|
|
|
- <el-input style="width:400px"
|
|
|
- disabled
|
|
|
+ <el-input disabled
|
|
|
v-model.trim="resetForm.name"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="适用分部"
|
|
|
+ label-width="120px"
|
|
|
prop="organ">
|
|
|
<el-select v-model.trim="resetForm.organ"
|
|
|
filterable
|
|
|
multiple
|
|
|
disabled
|
|
|
clearable>
|
|
|
- <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>
|
|
@@ -181,46 +184,51 @@
|
|
|
<!-- <el-button @click="onCheckAllBranch">适用所有分部</el-button> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程形式"
|
|
|
- prop="stauts">
|
|
|
+ prop="stauts"
|
|
|
+ label-width="120px">
|
|
|
<el-select v-model.trim="resetForm.stauts"
|
|
|
filterable
|
|
|
clearable
|
|
|
disabled
|
|
|
multiple>
|
|
|
- <el-option v-for="(item,index) in courseStatusList"
|
|
|
+ <el-option v-for="(item,index) in selects.vipGroupCategory"
|
|
|
:key="index"
|
|
|
:value="item.id"
|
|
|
:label="item.name"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="活动描述"
|
|
|
- prop="desc">
|
|
|
+ prop="desc"
|
|
|
+ label-width="120px">
|
|
|
<el-input type="textarea"
|
|
|
v-model.trim="resetForm.desc"
|
|
|
- style="width:400px"
|
|
|
:rows="5"
|
|
|
disabled
|
|
|
placeholder="请输入活动说明"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="活动时间"
|
|
|
- prop="activeTime">
|
|
|
+ prop="activeTime"
|
|
|
+ label-width="120px">
|
|
|
<el-date-picker v-model.trim="resetForm.activeTime"
|
|
|
+ style="width: 100%"
|
|
|
type="datetimerange"
|
|
|
range-separator="至"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
:picker-options="{
|
|
|
- firstDayOfWeek:1
|
|
|
- }"
|
|
|
+ firstDayOfWeek:1
|
|
|
+ }"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程时间"
|
|
|
- prop="courseTime">
|
|
|
+ prop="courseTime"
|
|
|
+ label-width="120px">
|
|
|
<el-date-picker v-model.trim="resetForm.courseTime"
|
|
|
+ style="width: 100%"
|
|
|
type="datetimerange"
|
|
|
:picker-options="{
|
|
|
- firstDayOfWeek:1
|
|
|
- }"
|
|
|
+ firstDayOfWeek:1
|
|
|
+ }"
|
|
|
range-separator="至"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
start-placeholder="开始日期"
|
|
@@ -228,10 +236,16 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
+ <el-alert
|
|
|
+ title="活动适用范围"
|
|
|
+ type="info"
|
|
|
+ :closable="false"
|
|
|
+ class="alert">
|
|
|
+ </el-alert>
|
|
|
<div class="activeRange">
|
|
|
- <div class="left">
|
|
|
+ <!-- <div class="left">
|
|
|
<p>活动适用范围&结算标准:</p>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="right">
|
|
|
<div class="chioseWrap">
|
|
|
<el-checkbox label="线上课"
|
|
@@ -322,10 +336,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-alert
|
|
|
+ title="活动类型"
|
|
|
+ type="info"
|
|
|
+ :closable="false"
|
|
|
+ style="margin-bottom: 15px;"
|
|
|
+ class="alert">
|
|
|
+ </el-alert>
|
|
|
<div class="activeType">
|
|
|
- <div class="left">
|
|
|
+ <!-- <div class="left">
|
|
|
<p style="width:60px;">活动类型</p>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="right">
|
|
|
<div>
|
|
|
<!-- @click="activeType='BASE_ACTIVITY'" -->
|
|
@@ -386,9 +407,10 @@ import {
|
|
|
removeVipActive
|
|
|
} from "@/api/vipSeting";
|
|
|
import { getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import Tooltip from '@/components/Tooltip'
|
|
|
export default {
|
|
|
name: "vipActiveList",
|
|
|
- components: { pagination },
|
|
|
+ components: { pagination, Tooltip },
|
|
|
data () {
|
|
|
return {
|
|
|
labelPosition: "right",
|
|
@@ -454,13 +476,15 @@ export default {
|
|
|
isReset: false
|
|
|
};
|
|
|
},
|
|
|
- created () {
|
|
|
+ // created () {
|
|
|
+ // this.init();
|
|
|
+ // },
|
|
|
+ // activated () {
|
|
|
+ // this.init();
|
|
|
+ // },
|
|
|
+ mounted () {
|
|
|
this.init();
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.init();
|
|
|
- },
|
|
|
- mounted () { },
|
|
|
filters: {
|
|
|
onlinePip (val) {
|
|
|
let obj = JSON.parse(val);
|
|
@@ -575,35 +599,38 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- init () {
|
|
|
- if (this.$route.query.searchForm) {
|
|
|
- this.$route.query.searchForm instanceof Object
|
|
|
- ? (this.searchForm = this.$route.query.searchForm)
|
|
|
- : (this.searchForm = JSON.parse(this.$route.query.searchForm));
|
|
|
- }
|
|
|
- if (this.$route.query.rules) {
|
|
|
- this.$route.query.rules instanceof Object
|
|
|
- ? (this.rules = this.$route.query.rules)
|
|
|
- : (this.rules = JSON.parse(this.$route.query.rules));
|
|
|
- }
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.organList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ async init () {
|
|
|
+ // if (this.$route.query.searchForm) {
|
|
|
+ // this.$route.query.searchForm instanceof Object
|
|
|
+ // ? (this.searchForm = this.$route.query.searchForm)
|
|
|
+ // : (this.searchForm = JSON.parse(this.$route.query.searchForm));
|
|
|
+ // }
|
|
|
+ // if (this.$route.query.rules) {
|
|
|
+ // this.$route.query.rules instanceof Object
|
|
|
+ // ? (this.rules = this.$route.query.rules)
|
|
|
+ // : (this.rules = JSON.parse(this.$route.query.rules));
|
|
|
+ // }
|
|
|
+ // getEmployeeOrgan().then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.organList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // 获取类型
|
|
|
+ await this.$store.dispatch('setVipGroupCategory')
|
|
|
+ // 获取分部
|
|
|
+ await this.$store.dispatch('setBranchs')
|
|
|
this.getList();
|
|
|
// 首先获取课程形式
|
|
|
// 获取分部id
|
|
|
- vipGroupCategory().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.courseStatusList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ // vipGroupCategory().then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.courseStatusList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
loadNumber (event) {
|
|
|
var el = event.currentTarget;
|
|
|
var elValue = el.value;
|
|
|
- console.log(elValue)
|
|
|
var reg = /^((?!0)\d{1,2}|100)$/;
|
|
|
if (!elValue.match(reg)) {
|
|
|
elValue = "";
|
|
@@ -623,15 +650,12 @@ export default {
|
|
|
},
|
|
|
search () {
|
|
|
this.rules.page = 1;
|
|
|
- this.getList();
|
|
|
+ this.$refs.searchForm.validate(valid => {
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
},
|
|
|
onReset () {
|
|
|
- // this.searchForm = {
|
|
|
- // enable: null,
|
|
|
- // search: null,
|
|
|
- // organId: null,
|
|
|
- // }
|
|
|
- this.$refs['searchForm'].resetFields();
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
this.search()
|
|
|
},
|
|
|
getList () {
|
|
@@ -730,10 +754,9 @@ export default {
|
|
|
this.resetForm.courseTime = [row.coursesStartTime, row.coursesEndTime];
|
|
|
}
|
|
|
// 同步适用范围
|
|
|
- let obj = JSON.parse(row.salarySettlementJson);
|
|
|
+ let obj = row.salarySettlementJson ? JSON.parse(row.salarySettlementJson) : {};
|
|
|
// 同步线上课状态
|
|
|
obj.onlineSalarySettlement ? (this.online = true) : (this.online = false);
|
|
|
- console.log(obj.onlineSalarySettlement)
|
|
|
if (obj.onlineSalarySettlement) {
|
|
|
this.onlineSalary = obj.salarySettlementType;
|
|
|
if (obj.onlineSalarySettlement.settlementValue) {
|
|
@@ -899,11 +922,8 @@ export default {
|
|
|
},
|
|
|
gotoNewActive () {
|
|
|
// 带参数 searchForm: { organId: null } 搜索条件
|
|
|
- let rules = JSON.stringify(this.rules);
|
|
|
- let searchForm = JSON.stringify(this.searchForm);
|
|
|
this.$router.push({
|
|
|
- path: "/vipClassSet/vipNewActive?type=create",
|
|
|
- query: { rules, searchForm }
|
|
|
+ path: "/vipClassSet/vipNewActive?type=create"
|
|
|
});
|
|
|
},
|
|
|
closeVipform () {
|
|
@@ -990,10 +1010,7 @@ export default {
|
|
|
}
|
|
|
.vipform {
|
|
|
.el-select {
|
|
|
- width: 400px !important;
|
|
|
- .el-input__inner {
|
|
|
- width: 400px;
|
|
|
- }
|
|
|
+ width: 100% !important;
|
|
|
}
|
|
|
}
|
|
|
.ishidden {
|