|
@@ -9,19 +9,10 @@
|
|
|
:hideMoney="true"
|
|
|
/>
|
|
|
<otherform :form="other" ref="other" />
|
|
|
-
|
|
|
- <!-- <div v-for="(item,index) in conrseTypeList" :key="index" style="margin-bottom:30px">
|
|
|
- <el-alert :title="getTypeName(item.courseType)" :closable="false" class="alert" type="info">
|
|
|
- </el-alert>
|
|
|
- <descriptions :column="2">
|
|
|
- <descriptions-item label="原价:">
|
|
|
- <el-input v-model="item.courseOriginalPrice" size='mini'></el-input>
|
|
|
- </descriptions-item>
|
|
|
- <descriptions-item label="现价:">
|
|
|
- <el-input v-model="item.courseCurrentPrice" size='mini'></el-input>
|
|
|
- </descriptions-item>
|
|
|
- </descriptions>
|
|
|
- </div> -->
|
|
|
+ <div style="margin-bottom: 20px">
|
|
|
+ <el-button type="primary" @click="dialogVisible = true">一件修改差价</el-button>
|
|
|
+ <el-button type="primary" @click="init">还原差价</el-button>
|
|
|
+ </div>
|
|
|
<el-table
|
|
|
:data="dataList"
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
@@ -50,7 +41,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="现价">
|
|
|
+ <el-table-column align="center" label="原班级剩余课程价值">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<div
|
|
@@ -58,12 +49,17 @@
|
|
|
v-for="(item, index) in scope.row.courseList"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <el-input v-model="item.courseCurrentPrice" size='mini'></el-input>
|
|
|
+ {{ item.subCourseAmount }}
|
|
|
+ <!-- <el-input v-model="item.courseCurrentPrice"></el-input> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="subjectNames" align="center" label="原价">
|
|
|
+ <el-table-column
|
|
|
+ prop="subjectNames"
|
|
|
+ align="center"
|
|
|
+ label="主班级剩余课程价值"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<div
|
|
@@ -71,12 +67,36 @@
|
|
|
v-for="(item, index) in scope.row.courseList"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <el-input v-model="item.courseOriginalPrice" size='mini'></el-input>
|
|
|
+ <!-- <el-input v-model="item.courseOriginalPrice"></el-input> -->
|
|
|
+ {{ item.masterSubCoursePrice}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="subjectNames" align="center" label="需补交差价">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ class="courseDiv"
|
|
|
+ v-for="(item, index) in scope.row.courseList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <el-input v-model="item.courseCurrentPrice"></el-input>
|
|
|
+ <!-- {{item.courseOriginalPrice}} -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-dialog title="一键修改差价" :visible.sync="dialogVisible" append-to-body width="500px" v-if="dialogVisible">
|
|
|
+ <calenderStudentList :conrseTypeList='conrseTypeList' ref='calenderStudentList'/>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="setAllprice"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -85,9 +105,10 @@ import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
|
|
|
import otherform from "@/views/resetTeaming/modals/other";
|
|
|
import { getTimes } from "@/utils";
|
|
|
import { spanGroupMergeClassSplitClassAffirm } from "@/api/buildTeam";
|
|
|
-import {filterCourseType} from "@/constant"
|
|
|
+import { courseType, filterCourseType } from "@/constant";
|
|
|
import descriptions from "@/components/Descriptions";
|
|
|
Vue.use(descriptions);
|
|
|
+import calenderStudentList from './resetCourseMasker'
|
|
|
export default {
|
|
|
props: [
|
|
|
"studentIds",
|
|
@@ -99,6 +120,7 @@ export default {
|
|
|
components: {
|
|
|
paymentCycle,
|
|
|
otherform,
|
|
|
+ calenderStudentList
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -110,7 +132,10 @@ export default {
|
|
|
},
|
|
|
other: {},
|
|
|
dataList: [],
|
|
|
+ copyList: {},
|
|
|
conrseTypeList: [],
|
|
|
+ filterCourseType,
|
|
|
+ dialogVisible:false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -118,13 +143,17 @@ export default {
|
|
|
// for (let item in this.mergeInfo) {
|
|
|
// this.activeNames.push(item);
|
|
|
// }
|
|
|
- this.mergeInfoList = [];
|
|
|
- for (let merge in this.mergeInfo) {
|
|
|
- this.mergeInfoList = this.mergeInfoList.concat(this.mergeInfo[merge]);
|
|
|
- }
|
|
|
- this.concatCourseLst(this.mergeInfoList);
|
|
|
+ this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ this.coypList = this.$helpers.lodash.cloneDeep(this.mergeInfo);
|
|
|
+ this.mergeInfoList = [];
|
|
|
+ for (let merge in this.coypList) {
|
|
|
+ this.mergeInfoList = this.mergeInfoList.concat(this.coypList[merge]);
|
|
|
+ }
|
|
|
+ this.concatCourseLst(this.mergeInfoList);
|
|
|
+ },
|
|
|
getCLassName(key) {
|
|
|
let str = "";
|
|
|
this.classList.forEach((classes) => {
|
|
@@ -234,20 +263,37 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.dataList = Object.values(data);
|
|
|
- // this.getNewClassType(this.dataList[0]?.courseList);
|
|
|
+ this.getNewClassType(this.dataList[0]?.courseList);
|
|
|
},
|
|
|
getNewClassType(arr) {
|
|
|
- console.log(this.$options)
|
|
|
this.conrseTypeList = arr.map((item) => {
|
|
|
return {
|
|
|
- courseType: item.courseType,
|
|
|
- courseCurrentPrice: item.courseCurrentPrice,
|
|
|
- courseOriginalPrice: item.courseOriginalPrice,
|
|
|
- };
|
|
|
+ type:item.courseType,
|
|
|
+ typeName:this.filterCourseType[item.courseType]+'补缴',
|
|
|
+ price:''
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
},
|
|
|
- getTypeName(type){
|
|
|
- return filterCourseType[type]
|
|
|
+ setAllprice(){
|
|
|
+ this.$refs.calenderStudentList.$refs.visitForm.validate(res=>{
|
|
|
+ if(res){
|
|
|
+ this.mergeInfoList.forEach(merge=>{
|
|
|
+ this.conrseTypeList.forEach(courseType=>{
|
|
|
+ if(merge.courseType == courseType.type){
|
|
|
+ // 修改为新值
|
|
|
+ merge.courseCurrentPrice = courseType.price
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.$refs.calenderStudentList.$refs.visitForm.resetFields();
|
|
|
+ this.dialogVisible = false
|
|
|
+ // this.conrseTypeList
|
|
|
+ // this.mergeInfoList
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
};
|