|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<!-- <h2>折扣设置</h2> -->
|
|
|
- <div v-if="(tableList.length>0 || pageInfo.page>1)&&contextFlag">
|
|
|
+ <div v-if="(tableList.length > 0 || pageInfo.page > 1) && contextFlag">
|
|
|
<save-form
|
|
|
:inline="true"
|
|
|
@submit="search"
|
|
@@ -93,7 +93,13 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <emptyPage @submit="addPrice" title='网管课收费设置' btnTitle='新建网管课收费设置' :context='context' v-if="!(tableList.length>0 || pageInfo.page>1)&&contextFlag" />
|
|
|
+ <emptyPage
|
|
|
+ @submit="addPrice"
|
|
|
+ title="网管课收费设置"
|
|
|
+ btnTitle="新建网管课收费设置"
|
|
|
+ :context="context"
|
|
|
+ v-if="!(tableList.length > 0 || pageInfo.page > 1) && contextFlag"
|
|
|
+ />
|
|
|
<el-dialog
|
|
|
:title="activeRow ? '修改' : '新建'"
|
|
|
:visible.sync="newVisiable"
|
|
@@ -128,8 +134,8 @@
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入每分钟课程费用',
|
|
|
- trigger: 'blur',
|
|
|
- },
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
]"
|
|
|
:prop="`singleClassMinutesPrice`"
|
|
|
>
|
|
@@ -139,7 +145,9 @@
|
|
|
step="0.00000001"
|
|
|
v-model="createForm.singleClassMinutesPrice"
|
|
|
>
|
|
|
- <template slot="append">每分钟费用(元)</template>
|
|
|
+ <template slot="append"
|
|
|
+ >元/节</template
|
|
|
+ >
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -149,8 +157,8 @@
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入每分钟课程费用',
|
|
|
- trigger: 'blur',
|
|
|
- },
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
]"
|
|
|
prop="comeOnPackagePrice"
|
|
|
>
|
|
@@ -160,7 +168,9 @@
|
|
|
step="0.00000001"
|
|
|
v-model="createForm.comeOnPackagePrice"
|
|
|
>
|
|
|
- <template slot="append">每分钟费用(元)</template>
|
|
|
+ <template slot="append"
|
|
|
+ >元</template
|
|
|
+ >
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -173,11 +183,16 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
-import { getPracticePriceList, resetPracticePriceList,addPracticePriceList,delPracticePriceList } from "./api";
|
|
|
-import emptyPage from '@/components/emptyPage'
|
|
|
+import {
|
|
|
+ getPracticePriceList,
|
|
|
+ resetPracticePriceList,
|
|
|
+ addPracticePriceList,
|
|
|
+ delPracticePriceList
|
|
|
+} from "./api";
|
|
|
+import emptyPage from "@/components/emptyPage";
|
|
|
export default {
|
|
|
name: "practiceRules",
|
|
|
- components: { pagination,emptyPage },
|
|
|
+ components: { pagination, emptyPage },
|
|
|
data() {
|
|
|
return {
|
|
|
newVisiable: false,
|
|
@@ -187,24 +202,25 @@ export default {
|
|
|
organList: [],
|
|
|
searchForm: {
|
|
|
organId: null,
|
|
|
- courseScheduleType: null,
|
|
|
+ courseScheduleType: null
|
|
|
},
|
|
|
createForm: {
|
|
|
organId: null,
|
|
|
comeOnPackagePrice: null,
|
|
|
- singleClassMinutesPrice: null,
|
|
|
+ singleClassMinutesPrice: null
|
|
|
},
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
|
page: 1, // 当前页
|
|
|
total: 0, // 总条数
|
|
|
- page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
},
|
|
|
formLabelWidth: "120px",
|
|
|
activeRow: null,
|
|
|
- context:'可根据不同分部设置不同的网管课课时和加油包课时总价,设置完成后,所选分部学员可在学生端APP以此价格自行购买网管课课程。加油包是由8节网管组成的课程组,用于为乐团训练中跟不上进度的学员单独辅导,每个学员仅有一次购买加油包的机会,且只可在后台为学员创建,设置单价时建议酌情优惠。',
|
|
|
- contextFlag:false
|
|
|
+ context:
|
|
|
+ "可根据不同分部设置不同的网管课课时和加油包课时总价,设置完成后,所选分部学员可在学生端APP以此价格自行购买网管课课程。加油包是由8节网管组成的课程组,用于为乐团训练中跟不上进度的学员单独辅导,每个学员仅有一次购买加油包的机会,且只可在后台为学员创建,设置单价时建议酌情优惠。",
|
|
|
+ contextFlag: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -227,11 +243,11 @@ export default {
|
|
|
await this.$confirm("是否删除此条数据?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
- delPracticePriceList({ organId: row.organId }).then((res) => {
|
|
|
- this.$message.success('删除成功')
|
|
|
- this.getList()
|
|
|
+ delPracticePriceList({ organId: row.organId }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getList();
|
|
|
});
|
|
|
} catch (error) {}
|
|
|
},
|
|
@@ -240,9 +256,9 @@ export default {
|
|
|
getPracticePriceList({
|
|
|
rows: this.pageInfo.limit,
|
|
|
page: this.pageInfo.page,
|
|
|
- organId: this.searchForm.organId,
|
|
|
- }).then((res) => {
|
|
|
- this.contextFlag = true
|
|
|
+ organId: this.searchForm.organId
|
|
|
+ }).then(res => {
|
|
|
+ this.contextFlag = true;
|
|
|
let result = res.data;
|
|
|
this.tableList = result.rows;
|
|
|
this.pageInfo.total = result.total;
|
|
@@ -250,10 +266,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
submitInfo() {
|
|
|
-
|
|
|
- this.$refs.ruleForm.validate(async (valid) => {
|
|
|
+ this.$refs.ruleForm.validate(async valid => {
|
|
|
if (valid) {
|
|
|
- console.log(this.createForm)
|
|
|
+ console.log(this.createForm);
|
|
|
if (this.activeRow) {
|
|
|
try {
|
|
|
await resetPracticePriceList(this.createForm);
|
|
@@ -267,7 +282,9 @@ export default {
|
|
|
this.$message.success("创建成功");
|
|
|
this.getList();
|
|
|
this.newVisiable = false;
|
|
|
- } catch (error) {console.log(error)}
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -275,7 +292,7 @@ export default {
|
|
|
openTypes(row) {
|
|
|
this.activeRow = row;
|
|
|
this.createForm = {
|
|
|
- ...row,
|
|
|
+ ...row
|
|
|
};
|
|
|
this.newVisiable = true;
|
|
|
},
|
|
@@ -284,10 +301,10 @@ export default {
|
|
|
this.$set(this, "createForm", {
|
|
|
organId: null,
|
|
|
comeOnPackagePrice: null,
|
|
|
- singleClassMinutesPrice: null,
|
|
|
+ singleClassMinutesPrice: null
|
|
|
});
|
|
|
this.newVisiable = true;
|
|
|
- },
|
|
|
+ }
|
|
|
// resetSubmit() {
|
|
|
// // resetOrganizationCourseUnitPrice
|
|
|
// this.$refs.resetForm.validate(async (valid) => {
|
|
@@ -296,7 +313,7 @@ export default {
|
|
|
// }
|
|
|
// });
|
|
|
// },
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|