Преглед изворни кода

Merge branch '03/03Lebao' of http://git.dayaedu.com/molingzhide/dy-admin-manager into 03/03Lebao

mo пре 4 година
родитељ
комит
aa7e58e3f2

+ 7 - 0
src/constant/index.js

@@ -225,6 +225,13 @@ export const packageStatus = {
   2: '已使用',
 }
 
+export const ProbationPeriodStatus = {
+  0: '正式',
+  1: '试用',
+  // 2: '离职',
+  3: '实习'
+}
+
 // export const musicScoreCategoriesId = [
 //   ''
 // ]

+ 2 - 1
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType } from '../constant'
+import { payOrderType, auditType, auditPaymentType, orderServerType, orderAuditType, rewardModeType,classTime,musicClassType,ProbationPeriodStatus } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "声部课", value: "SINGLE" },
@@ -221,6 +221,7 @@ export const orderServerList = getValueForKey(orderServerType)
 export const orderAuditTypeList = getValueForKey(orderAuditType)
 export const rewardModeTypeList = getValueForKey(rewardModeType)
 export const musicClassTypeList =  getValueForKey(musicClassType)
+export const ProbationPeriodList = getValueForKey(ProbationPeriodStatus)
 function getValueForKey (obj) {
   let arr = []
   for (let k in obj) {

+ 5 - 0
src/utils/vueFilter.js

@@ -726,3 +726,8 @@ Vue.filter('inspectionItemFormat', value => {
 Vue.filter('studentPackage', value => {
   return constant.packageStatus[value]
 })
+
+// 老师状态
+Vue.filter('ProbationPeriod', value => {
+  return constant.ProbationPeriodStatus[value]
+})

+ 70 - 8
src/views/resetTeaming/modals/subject-preview.vue

@@ -17,7 +17,7 @@
 						<span style="display: flex; align-items: center;">
 							<template v-if="item.courseType == 'PROJECT'">{{ chargeTypeName }} </template><template v-else>{{ item.courseType | coursesType }}</template>
 						</span>
-						<el-icon v-if="item.courseType == 'PROJECT'" class="el-icon-question" @click.native="onQuestions" />
+						<el-icon v-if="item.courseType == 'PROJECT'" class="el-icon-question" @click.native="onQuestions('amr')" />
 					</el-col>
 					<el-col :span="8">
 						<span style="color: #1A1A1A">¥{{ item.courseCurrentPrice | moneyFormat }}</span>
@@ -108,6 +108,25 @@
 					</el-col>
 				</el-row>
 			</div>
+
+            <div v-if="leBaoStatus">
+				<el-row class="title-row">
+					<el-col :span="12">服务项目</el-col>
+					<el-col :span="5" :offset="1" style="text-align: right;">原价</el-col>
+					<el-col :span="6" style="text-align: right;">现价</el-col>
+				</el-row>
+				<el-row class="option-row" @click="onLeBao">
+					<el-col :span="12">
+						<i class="check_default" :class="[ buyMaintenance ? 'check_active' : '' ]"></i>乐器保养(一年)<el-icon style="padding-left: 0;" name="question" @click.native="onQuestions('instrument')" />
+					</el-col>
+					<el-col :span="6">
+						<del style="color: #AAA; font-size: .12rem;">¥{{ 500 | moneyFormat }}</del>
+					</el-col>
+					<el-col :span="6">
+						<span style="color: #1A1A1A">¥{{ 300 | moneyFormat }}</span>
+					</el-col>
+				</el-row>
+			</div>
 		</div>
 
 		<div class="section" v-if="accessOries.length > 0" key="accessOries">
@@ -236,6 +255,8 @@ export default {
             chargeTypeList: [],
             chargeTypeName: null,
             courseViewType: 0, // 收费模式,0 课程显示,1 AMR系统
+            leBaoStatus: false,
+			buyMaintenance: false, // 是否开启乐保
             isClickStatus: false
         };
     },
@@ -412,12 +433,24 @@ export default {
                                 this.chargeTypeName = item.description
                             }
                         })
+
+                        // 乐保服务初始化
+                        this.instrumentResult.forEach(item => {
+                            if(item.checked && item.kitType == "GROUP") {
+                                this.leBaoStatus = true
+                                this.buyMaintenance = true
+                            }
+                        })
                     }
                 }
                 // 初始化计算金额
                 this.calcPrice()
             })
         },
+        onLeBao() {
+            this.buyMaintenance = !this.buyMaintenance
+            this.calcPrice()
+        },
         groupBy(array, f) {
             var groups = {};
             array.forEach(function (o) {
@@ -429,13 +462,22 @@ export default {
                 return groups[group];
             });
         },
-        onQuestions() {
-            this.$alert(`<b>革命性的“AMR器乐练习系统”</b><br />它的诞生是基于世界上最优秀的华人管乐指导专家唐嘉宏先生的教育理念,创新开发的一种新型“音乐感官植入程序”,这个程序抛弃了传统的“数线式识谱、机械式节奏、死记式乐理”,它营造出沉浸式可变速演奏过程,采用画面与音乐刺激序列组合而成的特定场景,在趣味性挑战的反复刺激中逐步促进器乐演奏的三核心:“音质→音准→音型”,从而达成演奏各环节水准的均匀提高,产生永久性条件反射式大脑记忆,将多板块知识融会贯通,让抽象的音乐知识刻入脑海里!<br /><br /><b>本练习系统的特点:</b><br /> 1.轻松快速掌握要点,让练习者沉浸其中,远离枯燥!<br /> 2.不假思索就能瞬间唤起反射式记忆,演奏识谱不再慢吞吞!<br /> 3.真正的实践记忆,摆脱纸上谈兵,与实际演奏紧密结合!<br />4.思维+肌肉的双重强化!无缝整合复习系统!<br /> 5.每条练习都经过严谨的编曲,你以为你只是在练习旋律线?其实是整个乐团在为你伴奏!`, 'AMR器乐练习系统', {
-                confirmButtonText: '确定',
-                dangerouslyUseHTMLString: true,
-                callback: action => {
-                }
-            });
+        onQuestions(type) {
+            if(type == 'amr') {
+                this.$alert(`<b>革命性的“AMR器乐练习系统”</b><br />它的诞生是基于世界上最优秀的华人管乐指导专家唐嘉宏先生的教育理念,创新开发的一种新型“音乐感官植入程序”,这个程序抛弃了传统的“数线式识谱、机械式节奏、死记式乐理”,它营造出沉浸式可变速演奏过程,采用画面与音乐刺激序列组合而成的特定场景,在趣味性挑战的反复刺激中逐步促进器乐演奏的三核心:“音质→音准→音型”,从而达成演奏各环节水准的均匀提高,产生永久性条件反射式大脑记忆,将多板块知识融会贯通,让抽象的音乐知识刻入脑海里!<br /><br /><b>本练习系统的特点:</b><br /> 1.轻松快速掌握要点,让练习者沉浸其中,远离枯燥!<br /> 2.不假思索就能瞬间唤起反射式记忆,演奏识谱不再慢吞吞!<br /> 3.真正的实践记忆,摆脱纸上谈兵,与实际演奏紧密结合!<br />4.思维+肌肉的双重强化!无缝整合复习系统!<br /> 5.每条练习都经过严谨的编曲,你以为你只是在练习旋律线?其实是整个乐团在为你伴奏!`, 'AMR器乐练习系统', {
+                    confirmButtonText: '确定',
+                    dangerouslyUseHTMLString: true,
+                    callback: action => {
+                    }
+                });
+            } else if(type == 'instrument') {
+                this.$alert(`<p style="text-align: justify">1.乐器保养是管乐迷针对乐团学员提供的乐器检查、保养及维修优惠特权;<br />2.该特权为包年制,从开通特权之日起365天内有效;<br />3.特权用户可享受管乐迷提供专业的高级乐器维修技师一年不低于两次下校检查乐器使用情况;<br />4.特权有效期内凭该特权绑定的乐器编号可享受保养人工费减免、非返厂维修人工费优惠等特权;<br />感谢您的信任和支持!</p>`, '乐器保养特权', {
+                    confirmButtonText: '确定',
+                    dangerouslyUseHTMLString: true,
+                    callback: action => {
+                    }
+                });
+            }
         },
         onCourseChange(item) {
             // 判断用户是否可以选择
@@ -468,6 +510,13 @@ export default {
                 item.checked = false
             })
             item.checked = true
+            if(item.kitType == "GROUP") {
+                this.leBaoStatus = true
+                this.buyMaintenance = true
+            } else {
+                this.leBaoStatus = false
+                this.buyMaintenance = false
+            }
             // 重新计算金额
             this.calcPrice()
         },
@@ -610,6 +659,19 @@ export default {
                     }
                 })
             }
+
+            if(this.leBaoStatus && this.buyMaintenance) {
+                // 判断是否使用乐保
+                marketPrice += 500
+                amount += 300
+                buyList.push({
+                    name: '乐器保养',
+                    time: dayjs().format('YYYY/MM/DD') + '~' + dayjs().add(365, 'day').format('YYYY/MM/DD'),
+                    type: '包年',
+                    price: 300
+                })
+            }
+
             amount += parseFloat(tempCourseFee + musicClassFee)
             if (parseFloat(tempCourseFee + musicClassFee) > 0 && this.courseViewType == 0) {
                 buyList.unshift({

+ 6 - 3
src/views/teacherManager/teacherList.vue

@@ -120,8 +120,10 @@
             filterable
             placeholder="员工状态"
           >
-            <el-option label="正式" value="0"></el-option>
+            <el-option v-for="item in ProbationPeriodList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            <!-- <el-option label="正式" value="0"></el-option>
             <el-option label="试用" value="1"></el-option>
+            <el-option label="实习" value="3"></el-option> -->
           </el-select>
         </el-form-item>
         <!-- isSupportExtraPracticeLesson -->
@@ -197,7 +199,7 @@
           </el-table-column>
           <el-table-column align="center" label="员工状态">
             <template slot-scope="scope">
-              {{ scope.row.isProbationPeriod == 0 ? "正式" : "试用" }}
+              {{ scope.row.isProbationPeriod | ProbationPeriod }}
             </template>
           </el-table-column>
           <el-table-column
@@ -360,7 +362,7 @@ import { teacherQueryPage } from "@/api/teacherManager";
 import { employeeOperate } from "@/api/systemManage";
 // import { subjectListTree } from "@/api/specialSetting";
 import { resetPassword2 } from "@/api/buildTeam";
-import { jobNature, teacherStatus } from "@/utils/searchArray";
+import { jobNature, teacherStatus, ProbationPeriodList } from "@/utils/searchArray";
 import store from "@/store";
 export default {
   name: "teacherList",
@@ -380,6 +382,7 @@ export default {
       },
       jobNature: jobNature, // 工作类型
       teacherStatus: teacherStatus, // 老师状态
+      ProbationPeriodList: ProbationPeriodList,
       subjectList: [], // 声部列表
       branchList: [], // 分部列表
       tableList: [],

+ 2 - 2
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -180,7 +180,7 @@
         </el-table>
 
         <el-form style="margin-top: 20px;">
-          <el-form-item label="生效日期">
+          <el-form-item required label="生效日期">
             <el-date-picker v-model.trim="startDate"
                             type="date"
                             value-format="yyyy-MM-dd"
@@ -538,7 +538,7 @@ export default {
         })
       })
       this.vipTable.forEach(item => {
-        console.log(item)
+        // console.log(item)
         if (item.offlineClassesSalary < 0 || item.onlineClassesSalary < 0) {
           this.$message.error("输入课酬不能为负数");
           checkStatus = false;

+ 5 - 2
src/views/teacherManager/teacherOperation/components/teacherOperation.vue

@@ -145,8 +145,10 @@
                   filterable
                   placeholder="员工状态"
                 >
-                  <el-option label="正式" :value="0"></el-option>
+                  <el-option v-for="item in ProbationPeriodList" :key="item.value" :label="item.label" :value="Number(item.value)"></el-option>
+                  <!-- <el-option label="正式" :value="0"></el-option>
                   <el-option label="试用" :value="1"></el-option>
+                  <el-option label="实习" :value="3"></el-option> -->
                 </el-select>
               </el-form-item>
             </el-col>
@@ -375,7 +377,7 @@ import { teacherAdd, teacherUpdate, teacherGet } from "@/api/teacherManager";
 import { getSubject } from "@/api/buildTeam";
 import store from "@/store";
 import { permission } from "@/utils/directivePage";
-import { jobNature } from "@/utils/searchArray";
+import { jobNature, ProbationPeriodList } from "@/utils/searchArray";
 import { isvalidPhone } from "@/utils/validate";
 let validPhone = (rule, value, callback) => {
   if (!value) {
@@ -395,6 +397,7 @@ export default {
         Authorization: getToken(),
       },
       jobNature: jobNature,
+      ProbationPeriodList: ProbationPeriodList,
       organId: null,
       pageType: this.$route.query.type,
       teacherId: this.$route.query.teacherId,