瀏覽代碼

Merge branch 'online' into wxlNew

lex-xin 4 年之前
父節點
當前提交
565ed4df5d

文件差異過大導致無法顯示
+ 0 - 0
dist/index.html


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/chunk-73bf4d01.01385cc6.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/chunk-df146308.abbe62db.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.3950ff23.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.433c7112.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-0bb95b3a.61d2f398.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-0bb95b3a.f44fffc7.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-41d5cec8.116c91dd.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-41d5cec8.6fa27da0.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-6562cc02.542bf27f.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-6562cc02.e6cd306d.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-65a0a182.69e56693.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-73bf4d01.b7c3e8a5.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-753ff94e.298ecddc.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-df146308.8a5a7f59.js


+ 14 - 0
src/utils/vueFilter.js

@@ -557,3 +557,17 @@ Vue.filter('visiterType', value => {
   }
   return template[value]
 })
+
+// 人力资源人员状态
+
+Vue.filter('hrStatus', value => {
+  let template = {
+    'NOT_EMPLOYED': "未录用",
+    'INTERVIEWING': "面试中",
+    'RESERVE': "储备",
+    'PART_TIME': "全职",
+    'FULL_TIME': "兼职",
+    'DIMISSION': "离职",
+  }
+  return template[value]
+})

+ 154 - 135
src/views/HumanResources/form.vue

@@ -17,7 +17,7 @@
               <th class="description-label">手机号</th>
               <td class="description-content">
                 <el-form-item prop="mobileNo">
-                  <el-input size="mini" v-model="form.mobileNo" placeholder="请输入手机号"/>
+                  <el-input size="mini" minlength="11" maxlength="11" v-model="form.mobileNo" placeholder="请输入手机号"/>
                 </el-form-item>
               </td>
               <th class="description-label">微信号</th>
@@ -80,48 +80,34 @@
               </td>
               <th class="description-label">声部</th>
               <td class="description-content">
-                <el-form-item prop="subjectId">
+                <el-form-item prop="subjectIdList">
                   <el-select
-                    v-model.trim="form.subjectId"
+                    v-model.trim="form.subjectIdList"
                     clearable
                     filterable
+                    multiple
                     size="mini"
+                    collapse-tags
                     placeholder='请选择声部'
                   >
-                    <el-option-group v-for="group in subjectList"
-                                      :key="group.label"
-                                      :label="group.label">
-                      <el-option v-for="item in group.options"
-                                  :key="item.value"
-                                  :label="item.label"
-                                  :value="item.value">
-                      </el-option>
-                    </el-option-group>
+                    <el-option v-for='(item,index) in subjectList'
+                      :key="index"
+                      :value="String(item.id)"
+                      :label="item.name"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </td>
             </tr>
             <tr class="description-tr">
-              <th class="description-label">是否经过评估</th>
-              <td class="description-content">
-                <el-form-item prop="isInterviewed">
-                  <el-select size="mini" v-model.trim="form.isInterviewed"
-                              clearable
-                              filterable
-                              placeholder="请选择是否经过评估">
-                    <el-option label="是"
-                                :value="true"></el-option>
-                    <el-option label="否"
-                                :value="false"></el-option>
-                  </el-select>
-                </el-form-item>
-              </td>
               <th class="description-label">信息来源</th>
               <td class="description-content">
                 <el-form-item prop="sourceFrom">
                   <el-select v-model.trim="form.sourceFrom"
                               clearable
                               filterable
+                              size="mini"
                               placeholder="请选择信息来源">
                     <el-option label="BOSS"
                                 value="BOSS"></el-option>
@@ -130,8 +116,38 @@
                   </el-select>
                 </el-form-item>
               </td>
-              <th class="description-label">其他综合情况</th>
+              <th class="description-label">评估结果</th>
+              <td class="description-content" colspan="3">
+                <el-form-item prop="assessmentResult">
+                  <el-input size="mini" v-model.trim="form.assessmentResult" placeholder="请输入评估结果"/>
+                </el-form-item>
+              </td>
+            </tr>
+            <tr class="description-tr">
+              <th class="description-label">人员状态</th>
               <td class="description-content">
+                <el-form-item prop="status">
+                  <el-select size="mini" v-model.trim="form.status"
+                              clearable
+                              filterable
+                              placeholder="请选择人员状态">
+                    <el-option label="未录用"
+                                value="NOT_EMPLOYED"></el-option>
+                    <el-option label="面试中"
+                                value="INTERVIEWING"></el-option>
+                    <el-option label="储备"
+                                value="RESERVE"></el-option>
+                    <el-option label="全职"
+                                value="PART_TIME"></el-option>
+                    <el-option label="兼职"
+                                value="FULL_TIME"></el-option>
+                    <el-option label="离职"
+                                value="DIMISSION"></el-option>
+                  </el-select>
+                </el-form-item>
+              </td>
+              <th class="description-label">其他综合情况</th>
+              <td class="description-content" colspan="3">
                 <el-form-item prop="otherComment">
                   <el-input size="mini" v-model.trim="form.otherComment" placeholder="请输入其他综合情况"/>
                 </el-form-item>
@@ -150,7 +166,10 @@
             <tr class="description-tr">
               <th class="description-label">入职日期</th>
               <td class="description-content">
-                <el-form-item prop="entryDate">
+                <el-form-item
+                  prop="entryDate"
+                  :rules="{ required: propRequred, message: '请输入入职日期', trigger: 'change' }"
+                >
                   <el-date-picker
                     type="date"
                     placeholder="选择入职日期"
@@ -161,7 +180,10 @@
               </td>
               <th class="description-label">职位</th>
               <td class="description-content">
-                <el-form-item prop="position">
+                <el-form-item
+                  prop="position"
+                  :rules="{ required: propRequred, message: '请输入职位', trigger: 'change' }"
+                >
                   <el-select v-model.trim="form.position"
                             clearable
                             filterable
@@ -178,7 +200,10 @@
               </td>
               <th class="description-label">分部</th>
               <td class="description-content">
-                <el-form-item prop="organId">
+                <el-form-item
+                  prop="organId"
+                  :rules="{ required: propRequred, message: '请选择分部', trigger: 'change' }"
+                >
                   <el-select v-model.trim="form.organId"
                       placeholder='请选择分部'
                       clearable
@@ -196,52 +221,29 @@
               </td>
             </tr>
             <tr class="description-tr">
-              <th class="description-label">员工类型</th>
-              <td class="description-content">
-                <el-form-item prop="jobNature">
-                  <el-select size="mini" v-model.trim="form.jobNature"
-                              clearable
-                              filterable
-                              placeholder="请选择员工类型">
-                    <el-option label="全职"
-                                value="FULL_TIME"></el-option>
-                    <el-option label="兼职"
-                                value="PART_TIME"></el-option>
-                    <el-option label="临时"
-                                value="TEMPORARY"></el-option>
-                  </el-select>
-                </el-form-item>
-              </td>
-              <th class="description-label">员工状态</th>
+              <th class="description-label">是否试用期</th>
               <td class="description-content">
-                <el-form-item prop="isProbationPeriod">
+                <el-form-item
+                  prop="isProbationPeriod"
+                  :rules="{ required: propRequred, message: '请选择是否试用期', trigger: 'change' }"
+                >
                   <el-select size="mini" v-model.trim="form.isProbationPeriod"
                               clearable
                               filterable
-                              placeholder="请选择员工状态">
-                    <el-option label="正式"
+                              placeholder="请选择是否试用期">
+                    <el-option label="是"
                                 :value="true"></el-option>
-                    <el-option label="试用"
+                    <el-option label="否"
                                 :value="false"></el-option>
                   </el-select>
                 </el-form-item>
               </td>
-              <th class="description-label">离职日期</th>
-              <td class="description-content">
-                <el-form-item prop="resignationDate">
-                  <el-date-picker
-                    type="date"
-                    placeholder="选择离职日期"
-                    size="mini"
-                    v-model="form.resignationDate"
-                  />
-                </el-form-item>
-              </td>
-            </tr>
-            <tr class="description-tr">
               <th class="description-label">证件号码</th>
-              <td class="description-content" colspan="5">
-                <el-form-item prop="idCard">
+              <td class="description-content" colspan="3">
+                <el-form-item
+                  prop="idCard"
+                  :rules="{ required: propRequred, message: '请输入证件号码', trigger: 'blur' }"
+                >
                   <el-input size="mini" v-model="form.idCard" placeholder="请输入证件号码"/>
                 </el-form-item>
               </td>
@@ -249,13 +251,21 @@
             <tr class="description-tr">
               <th class="description-label">年龄</th>
               <td class="description-content">
-                <el-form-item prop="age">
-                  <el-input v-model="form.age" size="mini" placeholder="请输入年龄"/>
+                <el-form-item
+                  prop="age"
+                  :rules="[
+                    { required: propRequred, message: '请输入年龄', trigger: 'blur' }
+                  ]"
+                >
+                  <el-input v-model="form.age" size="mini" type="number" min="1" step="1" placeholder="请输入年龄"/>
                 </el-form-item>
               </td>
               <th class="description-label">性别</th>
-              <td class="description-content" colspan="3">
-                <el-form-item prop="gender">
+              <td class="description-content">
+                <el-form-item
+                  prop="gender"
+                  :rules="{ required: propRequred, message: '请选择性别', trigger: 'change' }"
+                >
                   <el-select size="mini" v-model.trim="form.gender"
                               clearable
                               filterable
@@ -267,17 +277,37 @@
                   </el-select>
                 </el-form-item>
               </td>
+              <th class="description-label">离职日期</th>
+              <td class="description-content">
+                <el-form-item
+                  prop="resignationDate"
+                  :rules="{ required: form.status === 'DIMISSION', message: '请选择离职日期', trigger: 'change' }"
+                >
+                  <el-date-picker
+                    type="date"
+                    placeholder="选择离职日期"
+                    size="mini"
+                    v-model="form.resignationDate"
+                  />
+                </el-form-item>
+              </td>
             </tr>
             <tr class="description-tr">
               <th class="description-label">开户行</th>
               <td class="description-content">
-                <el-form-item prop="bankAddress">
+                <el-form-item
+                  prop="bankAddress"
+                  :rules="{ required: propRequred, message: '请输入开户行', trigger: 'blur' }"
+                >
                   <el-input size="mini" v-model="form.bankAddress" placeholder="请输入开户行"/>
                 </el-form-item>
               </td>
               <th class="description-label">银行卡号</th>
               <td class="description-content" colspan="3">
-                <el-form-item prop="bankCardNo">
+                <el-form-item
+                  prop="bankCardNo"
+                  :rules="{ required: propRequred, message: '请输入银行卡号', trigger: 'blur' }"
+                >
                   <el-input size="mini" v-model="form.bankCardNo" placeholder="请输入银行卡号"/>
                 </el-form-item>
               </td>
@@ -285,20 +315,32 @@
             <tr class="description-tr">
               <th class="description-label">紧急联系人姓名</th>
               <td class="description-content">
-                <el-form-item prop="emergencyContactName">
+                <el-form-item
+                  prop="emergencyContactName"
+                  :rules="{ required: propRequred, message: '请输入紧急联系人姓名', trigger: 'blur' }"
+                >
                   <el-input size="mini" v-model.trim="form.emergencyContactName" placeholder="请输入紧急联系人姓名"/>
                 </el-form-item>
               </td>
               <th class="description-label">紧急联系人关系</th>
               <td class="description-content">
-                <el-form-item prop="emergencyContactRelation">
+                <el-form-item
+                  prop="emergencyContactRelation"
+                  :rules="{ required: propRequred, message: '请输入紧急联系人关系', trigger: 'blur' }"
+                >
                   <el-input size="mini" v-model.trim="form.emergencyContactRelation" placeholder="请输入紧急联系人关系"/>
                 </el-form-item>
               </td>
               <th class="description-label">紧急联系人电话</th>
               <td class="description-content">
-                <el-form-item prop="emergencyContactPhone">
-                  <el-input size="mini" v-model.trim="form.emergencyContactPhone" placeholder="请输入紧急联系人电话"/>
+                <el-form-item
+                  prop="emergencyContactPhone"
+                  :rules="[
+                    { required: propRequred, message: '请输入紧急联系人电话', trigger: 'blur' },
+                    { min: 11, max: 11, message: '请输入正确的手机号码', trigger: 'blur' }
+                  ]"
+                >
+                  <el-input size="mini" v-model.trim="form.emergencyContactPhone" minlength="11" maxlength="11" placeholder="请输入紧急联系人电话"/>
                 </el-form-item>
               </td>
             </tr>
@@ -337,75 +379,43 @@ export default {
         emergencyContactPhone: '',
         emergencyContactRelation: '',
         entryDate: '',
-        gender: true,
+        gender: '',
         idCard: '',
         intentionCity: '',
-        isInterviewed: true,
-        isProbationPeriod: true,
-        jobNature: '',
+        assessmentResult: '',
+        status: '',
+        isProbationPeriod: '',
         liveCity: '',
         mobileNo: '',
         otherComment: '',
         position: '',
         realName: '',
         resignationDate: '',
-        subjectId: '',
+        subjectIdList: [],
         wechatNo: '',
         organId: '',
         sourceFrom: '',
         educations: [{level: '', school: '', year: ''}]
       },
       rules: {
-        age: [
-          { required: true, message: '请输入年龄', trigger: 'blur' },
-        ],
-        bankAddress: [
-          { required: true, message: '请输入开户行', trigger: 'blur' },
-        ],
-        bankCardNo: [
-          { required: true, message: '请输入卡号', trigger: 'blur' },
-        ],
         birthdate: [
           { required: true, message: '请输入生日', trigger: 'blur' },
         ],
         sourceFrom: [
-          { required: true, message: '请输入信息来源', trigger: 'blur' },
-        ],
-        emergencyContactName: [
-          { required: true, message: '请输入紧急联系人姓名', trigger: 'blur' },
-        ],
-        emergencyContactPhone: [
-          { required: true, message: '请输入紧急联系人电话', trigger: 'blur' },
-        ],
-        emergencyContactRelation: [
-          { required: true, message: '请输入紧急联系人关系', trigger: 'blur' },
-        ],
-        entryDate: [
-          { required: true, message: '请输入入职日期', trigger: 'blur' },
-        ],
-        gender: [
-          { required: true, message: '请选择性别', trigger: 'blur' },
-        ],
-        idCard: [
-          { required: true, message: '请输入证件号码', trigger: 'blur' },
+          { required: true, message: '请选择信息来源', trigger: 'change' },
         ],
         intentionCity: [
           { required: true, message: '请输入工作意向', trigger: 'blur' },
         ],
-        isInterviewed: [
-          { required: true, message: '请选择是否经过评估', trigger: 'blur' },
-        ],
-        isProbationPeriod: [
-          { required: true, message: '请选择员工状态', trigger: 'blur' },
-        ],
-        jobNature: [
-          { required: true, message: '请选择员工类型', trigger: 'blur' },
+        status: [
+          { required: true, message: '请选择员工状态', trigger: 'change' },
         ],
         liveCity: [
           { required: true, message: '请输入所在城市', trigger: 'blur' },
         ],
         mobileNo: [
           { required: true, message: '请输入手机号', trigger: 'blur' },
+          { min: 11, max: 11, message: '请输入正确的手机号码', trigger: 'blur' }
         ],
         otherComment: [
           { required: true, message: '请输入其他综合情况', trigger: 'blur' },
@@ -416,17 +426,8 @@ export default {
         realName: [
           { required: true, message: '请输入姓名', trigger: 'blur' },
         ],
-        resignationDate: [
-          { required: true, message: '请选择离职日期', trigger: 'blur' },
-        ],
-        subjectId: [
-          { required: true, message: '请选择声部', trigger: 'blur' },
-        ],
-        organId: [
-          { required: true, message: '请选择分部', trigger: 'blur' },
-        ],
-        wechatNo: [
-          { required: true, message: '请输入微信号', trigger: 'blur' },
+        subjectIdList: [
+          { required: true, message: '请选择声部', trigger: 'change' },
         ],
       }
     }
@@ -439,20 +440,38 @@ export default {
   mounted() {
     this.updateData()
   },
+  computed: {
+    propRequred() {
+      return this.form.status === 'PART_TIME' || this.form.status === 'FULL_TIME' || this.form.status === 'DIMISSION'
+    }
+  },
   methods: {
     updateData() {
       if (this.detail) {
-        this.form = Object.assign({}, this.detail)
+        try {
+          this.detail.subjectIdList = this.detail.subjectIdList.split(',')
+        } catch (error) {}
+        if (this.detail.organId === 0) {
+          this.detail.organId = ''
+        }
+        if (this.detail.age === 0) {
+          this.detail.age = ''
+        }
+        this.form = Object.assign({
+          educations: [{level: '', school: '', year: ''}]
+        }, this.detail)
         try {
           this.form.educations = JSON.parse(this.detail.educationalBackground)
           if (this.form.educations.length < 1) {
             this.form.educations = [{level: '', school: '', year: ''}]
           }
+          this.form = {...this.form}
         } catch (error) {}
       } else {
         this.form.educations = [{level: '', school: '', year: ''}]
+        this.form = {...this.form}
       }
-      this.form = {...this.form}
+      this.$refs['ruleForm'].resetFields()
     },
     addEducation() {
       this.form.educations = [...this.form.educations, {level: '', school: '', year: ''}]
@@ -467,10 +486,10 @@ export default {
       this.$refs['ruleForm'].validate(valid => {
         if (valid) {
           const { $message } = this
-          const {educations, ...rest} = this.form
-          this.form.educationalBackground = JSON.stringify(educations)
-          if (this.detail) {
-            employeeUpdate(Object.assign({id: this.detail.id}, rest))
+          this.form.educationalBackground = JSON.stringify(this.form.educations)
+          const {educations, subjectIdList, ...rest} = this.form
+          if (this.detail && this.detail.id) {
+            employeeUpdate(Object.assign({id: this.detail.id, subjectIdList: (subjectIdList || []).join(',')}, rest))
             .then(res => {
               if (res.code === 200) {
                 $message.success('修改成功')
@@ -479,7 +498,7 @@ export default {
               }
             })
           } else {
-            employeeCreate(rest)
+            employeeCreate({subjectIdList: (subjectIdList || []).join(','), ...rest})
             .then(res => {
               if (res.code === 200) {
                 $message.success('创建成功')

+ 89 - 61
src/views/HumanResources/index.vue

@@ -23,16 +23,22 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-select v-model.trim="searchForm.jobNature"
+          <el-select v-model.trim="searchForm.status"
                      clearable
                      filterable
-                     placeholder="请选择员工类型">
+                     placeholder="请选择人员状态">
+            <el-option label="未录用"
+                        value="NOT_EMPLOYED"></el-option>
+            <el-option label="面试中"
+                        value="INTERVIEWING"></el-option>
+            <el-option label="储备"
+                        value="RESERVE"></el-option>
             <el-option label="全职"
-                       value="FULL_TIME"></el-option>
+                        value="PART_TIME"></el-option>
             <el-option label="兼职"
-                       value="PART_TIME"></el-option>
-            <el-option label="临时"
-                       value="TEMPORARY"></el-option>
+                        value="FULL_TIME"></el-option>
+            <el-option label="离职"
+                        value="DIMISSION"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -72,15 +78,12 @@
             filterable
             placeholder='请选择声部'
           >
-            <el-option-group v-for="group in subjectList"
-                             :key="group.label"
-                             :label="group.label">
-              <el-option v-for="item in group.options"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value">
-              </el-option>
-            </el-option-group>
+          <el-option v-for='(item,index) in subjectList'
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -92,7 +95,13 @@
         <el-table :data="tableList"
           :header-cell-style="{background:'#EDEEF0',color:'#444'}">
           <el-table-column width="120px" align="center" prop="id" label="编号"></el-table-column>
-          <el-table-column align="center" prop="realName" label="姓名"></el-table-column>
+          <el-table-column align="center" prop="realName" label="姓名">
+            <template slot-scope="scope">
+              <el-tooltip class="item" effect="dark" :content="scope.row.realName" placement="top">
+                <span>{{ scope.row.realName}}</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
           <el-table-column align="center" prop="mobileNo" label="手机号"></el-table-column>
           <el-table-column align="center" prop="wechatNo" label="微信"></el-table-column>
           <el-table-column align="center" label="学历信息">
@@ -100,21 +109,37 @@
               <el-button @click="openEducation(scope.row)" type="text">查看学历</el-button>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="subjectId" label="声部">
+          <el-table-column align="center" prop="subjectName" label="声部" width="200px">
             <template slot-scope="scope">
-              {{ subjectListObj[scope.row.subjectId] }}
+              <el-tooltip class="item" effect="dark" :content="scope.row.subjectName" placement="top">
+                <span>{{ scope.row.subjectName}}</span>
+              </el-tooltip>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="liveCity" label="所在城市"></el-table-column>
-          <el-table-column align="center" prop="intentionCity" label="工作意向"></el-table-column>
-          <el-table-column align="center" prop="isInterviewed" label="是否经过评估">
+          <el-table-column align="center" prop="intentionCity" label="工作意向" width="100px">
+            <template slot-scope="scope">
+              <el-tooltip class="item" effect="dark" :content="scope.row.intentionCity" placement="top">
+                <span>{{ scope.row.intentionCity}}</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="assessmentResult" label="评估结果" width="200px">
             <template slot-scope="scope">
-              {{ scope.row.gender ? '是' : '否' }}
+              <el-tooltip class="item" effect="dark" :content="scope.row.assessmentResult" placement="top">
+                <span>{{ scope.row.assessmentResult}}</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="otherComment" label="其它综合情况" width="200px">
+            <template slot-scope="scope">
+              <el-tooltip class="item" effect="dark" :content="scope.row.otherComment" placement="top">
+                <span>{{ scope.row.otherComment}}</span>
+              </el-tooltip>
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="otherComment" label="其它综合情况"></el-table-column>
           <el-table-column align="center" prop="sourceFrom" label="信息来源"></el-table-column>
-          <el-table-column align="center" prop="entryDate" label="入职时间">
+          <el-table-column align="center" prop="entryDate" label="入职时间" width="150px">
             <template slot-scope="scope">
               {{ scope.row.entryDate | dayjsFormat}}
             </template>
@@ -124,35 +149,36 @@
               {{ scope.row.position | jobType }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="organId" label="分部">
+          <el-table-column align="center" prop="organName" label="分部"></el-table-column>
+          <el-table-column align="center" prop="isProbationPeriod" label="是否试用期">
             <template slot-scope="scope">
-              {{ organListObj[scope.row.organId] }}
+              {{ typeof scope.row.isProbationPeriod === 'boolean' ? scope.row.isProbationPeriod ? '是' : '否' : '' }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="jobNature" label="员工类型">
+          <el-table-column align="center" prop="status" label="人员状态">
             <template slot-scope="scope">
-              {{ scope.row.jobNature | jobNature }}
+              {{ scope.row.status | hrStatus }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="isProbationPeriod" label="员工状态">
+          <el-table-column align="center" prop="idCard" label="证件号码" width="200px"></el-table-column>
+          <el-table-column align="center" prop="age" label="年龄">
             <template slot-scope="scope">
-              {{ scope.row.isProbationPeriod ? '正式' : '试用' }}
+              {{ scope.row.age > 0 ? scope.row.age : '' }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="idCard" label="证件号码"></el-table-column>
-          <el-table-column align="center" prop="age" label="年龄"></el-table-column>
           <el-table-column align="center" prop="gender" label="性别">
             <template slot-scope="scope">
-              {{ scope.row.gender ? '男' : '女' }}
+              {{ typeof scope.row.gender === 'boolean' ? scope.row.gender ? '男' : '女' : '' }}
             </template>
           </el-table-column>
-          <el-table-column align="center" prop="bankCardNo" label="银行卡号"></el-table-column>
-          <el-table-column align="center" prop="bankAddress" label="开户行"></el-table-column>
+          <el-table-column align="center" prop="bankCardNo" label="银行卡号" width="200px"></el-table-column>
+          <el-table-column align="center" prop="bankAddress" label="开户行" width="200px"></el-table-column>
           <el-table-column align="center" prop="emergencyContactName" label="紧急联系人"></el-table-column>
           <el-table-column align="center" prop="emergencyContactRelation" label="紧急联系人关系"></el-table-column>
           <el-table-column align="center" prop="emergencyContactPhone" label="紧急联系人电话"></el-table-column>
-          <el-table-column align="center" prop="updateTime" label="最后一次操作时间时间"></el-table-column>
-          <el-table-column align="center" prop="resignationDate" label="离职时间">
+          <el-table-column align="center" prop="updateTime" label="最后一次操作时间时间" width="160px"></el-table-column>
+          <el-table-column align="center" prop="operatorName" label="归属管理HR"></el-table-column>
+          <el-table-column align="center" prop="resignationDate" label="离职时间" width="150px">
             <template slot-scope="scope">
               {{ scope.row.resignationDate | dayjsFormat}}
             </template>
@@ -214,7 +240,7 @@ import {
   helpCenterContentModify,
   helpCenterContentDelete
 } from "@/api/appTenant";
-import { getEmployeeOrgan } from '@/api/buildTeam'
+import { getEmployeeOrgan, getSubject } from '@/api/buildTeam'
 import { subjectListTree } from '@/api/specialSetting'
 
 const initSearch = {
@@ -269,6 +295,7 @@ export default {
   },
   activated() {
     this.getList();
+    this.getSubjectList()
     // this.getTreeList()
   },
   computed: {
@@ -276,10 +303,7 @@ export default {
       const data = {}
       for (let i = 0; i < this.subjectList.length; i++) {
         const item = this.subjectList[i];
-        for (let j = 0; j < item.options.length; j++) {
-          const option = item.options[j];
-          data[option.value] = option.label
-        }
+        data[item.id] = item.name
       }
       return data
     },
@@ -294,38 +318,41 @@ export default {
   },
   mounted() {
     this.getList();
-    this.getTreeList()
+    // this.getTreeList()
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
         this.organList = res.data;
       }
     })
-    subjectListTree({
+    this.getSubjectList()
+  },
+  methods: {
+    getSubjectList() {
+      getSubject({
         delFlag: 0,
-        rows: 9999
+        tenantId: 1,
       }).then(res => {
         let result = res.data
         if (res.code == 200) {
-          let tempArray = []
-          result.rows.forEach((item, index) => {
-            let subject = []
-            item.subjects.forEach(s => {
-              subject.push({
-                value: s.id,
-                label: s.name
-              })
-            })
+          // let tempArray = []
+          // result.rows.forEach((item, index) => {
+          //   let subject = []
+          //   item.subjects.forEach(s => {
+          //     subject.push({
+          //       value: s.id,
+          //       label: s.name
+          //     })
+          //   })
 
-            tempArray[index] = {
-              label: item.name,
-              options: subject
-            }
-          })
-          this.subjectList = tempArray
+          //   tempArray[index] = {
+          //     label: item.name,
+          //     options: subject
+          //   }
+          // })
+          this.subjectList = result
         }
       })
-  },
-  methods: {
+    },
     openEducation(row) {
       try {
         this.educationList = JSON.parse(row.educationalBackground)
@@ -512,6 +539,7 @@ export default {
 /deep/.el-table .cell {
     display: -webkit-box;
     overflow: hidden;
+    max-height: 45px;
     text-overflow: ellipsis;
     -webkit-line-clamp: 3;
     -webkit-box-orient: vertical;

+ 83 - 13
src/views/resetTeaming/components/resetSound.vue

@@ -227,7 +227,8 @@
             <div class="item">{{ item.shopName}}</div>
             <div class="item">提供方式</div>
             <div class="item">提供方式对应金额</div>
-            <div class="item">减免金额</div>
+            <div class="item">乐器费用减免</div>
+            <div class="item">课程费用减免</div>
           </div>
 
           <div class="lineWrap">
@@ -250,7 +251,13 @@
                         type="number"
                         v-model.trim="item.mode.GROUP"></el-input>
             </div>
-
+            <div class="item">
+              <el-input style="width:80%"
+                        type="number"
+                        @mousewheel.native.prevent
+                        v-model.trim="item.mode.courseGroup"
+                        @input="groupCourseInput(item)"></el-input>
+            </div>
           </div>
 
           <div class="lineWrap">
@@ -271,11 +278,15 @@
             <div class="item">
               <el-input style="width:80%"
                         type="number"
+                        disabled
                         @mousewheel.native.prevent
                         @input='deposiInput(item)'
                         v-model.trim="item.mode.LEASE"></el-input>
             </div>
-
+            <div class="item">
+              <el-input style="width:80%" disabled
+                        type="number"></el-input>
+            </div>
           </div>
 
           <div class="lineWrap">
@@ -296,7 +307,10 @@
                         @mousewheel.native.prevent
                         disabled></el-input>
             </div>
-
+            <div class="item">
+              <el-input style="width:80%" disabled
+                        type="number"></el-input>
+            </div>
           </div>
         </div>
       </div>
@@ -363,7 +377,7 @@ export default {
             let fangshi = []
             res.data.musicGroupSubjectGoodsGroups.forEach(sub => {
               if (sub.subjectId == item.subjectId && sub.type == 'INSTRUMENT') {
-                let FREE, LEASE, GROUP;
+                let FREE, courseFree, LEASE, courseLease, GROUP, courseGroup;
                 let isFREE = false
                 let isLEASE = false
                 let isGROUP = false
@@ -384,7 +398,18 @@ export default {
                     GROUP = expectJson.GROUP
                     isGROUP = true
                   }
-
+                }
+                if(sub.coursePurchaseTypeJson) {
+                  let courseJson = JSON.parse(sub.coursePurchaseTypeJson)
+                  if (courseJson && courseJson.hasOwnProperty("FREE")) {
+                    courseFree = courseJson.FREE;
+                  }
+                  if (courseJson && courseJson.hasOwnProperty("LEASE")) {
+                    courseLease = courseJson.LEASE;
+                  }
+                  if (courseJson && courseJson.hasOwnProperty("GROUP")) {
+                    courseGroup = courseJson.GROUP;
+                  }
                 }
                 fangshi.push({
                   shopName: sub.name,
@@ -393,6 +418,9 @@ export default {
                     'FREE': FREE || 0,
                     'GROUP': GROUP || 0,
                     'LEASE': LEASE || 0,
+                    courseFree: courseFree || 0,
+                    courseLease: courseLease || null,
+                    courseGroup: courseGroup || 0,
                     'depositFee': depositFee || 1500, // 保证金
                     'price': price,
                     'isFREE': isFREE,
@@ -499,6 +527,7 @@ export default {
           let kitGroupPurchaseTypeJson = null
           let depositFee;
           let price
+          let coursePurchaseTypeJson = null;
           active.fangshi.forEach(fs => {
             if (fs.id == zl) {
               depositFee = fs.mode.depositFee
@@ -519,6 +548,21 @@ export default {
               if (kitGroupPurchaseTypeJson.length <= 0) {
                 kitGroupPurchaseTypeJson = null
               }
+
+              let courseTypes = {}
+              if(fs.mode.courseFree) {
+                courseTypes.FREE = fs.mode.courseFree
+              }
+              if(fs.mode.courseGroup) {
+                courseTypes.GROUP = fs.mode.courseGroup ? fs.mode.courseGroup : 0
+              }
+              if(fs.mode.courseLease) {
+                courseTypes.LEASE = fs.mode.courseLease
+              }
+              coursePurchaseTypeJson = JSON.stringify(courseTypes)
+              if (coursePurchaseTypeJson.length <= 0) {
+                coursePurchaseTypeJson = null;
+              }
             }
           })
           let some = {
@@ -527,6 +571,7 @@ export default {
             goodsIdList: zl,
             name: goodsItem.name,
             kitGroupPurchaseTypeJson,
+            coursePurchaseTypeJson,
             depositFee,
             price
           }
@@ -629,7 +674,11 @@ export default {
       // row.fangshi = []
       // row.zhonglei
       // row.goodsList
+      const tyuji = row.yuji
       if (row.fangshi[0] && row.fangshi[0].mode) {
+        row.fangshi.forEach(item => {
+          item.mode.yuji = tyuji
+        })
       } else {
         for (let i in row.goodsList) {
           for (let j in row.zhonglei) {
@@ -643,6 +692,9 @@ export default {
                   'FREE': 0,
                   'GROUP': 0,
                   'LEASE': 0,
+                  courseFree: 0,
+                  courseLease: null,
+                  courseGroup: 0,
                   'depositFee': 1500, // 保证金
                   'price': row.goodsList[i].groupPurchasePrice,// 团购价
                   'isFREE': false,
@@ -671,6 +723,13 @@ export default {
         item.mode.GROUP = item.mode.price
       }
     },
+    groupCourseInput(item) {
+      console.log(item)
+      let mode = item.mode
+      if(mode.yuji - mode.courseGroup < 0) {
+        mode.courseGroup = mode.yuji
+      }
+    },
     deposiInput (item) {
       if (item.mode.depositFee - item.mode.LEASE < 0) {
         item.mode.LEASE = item.mode.depositFee
@@ -707,15 +766,26 @@ export default {
     fangshiFilter (val, price) {
       let str = ''
       for (let i in val) {
-        str += `${val[i].shopName}:`
-        if (val[i].mode.isFREE) {
-          str += `免费:减免金额${val[i].mode['FREE']}\n`
+        // str += `${val[i].shopName}:`
+        // if (val[i].mode.isFREE) {
+        //   str += `免费:减免金额${val[i].mode['FREE']}\n`
+        // }
+        // if (val[i].mode.isGROUP) {
+        //   str += `团购:减免金额${val[i].mode['GROUP']}\n`
+        // }
+        // if (val[i].mode.isLEASE) {
+        //   str += `租赁:${val[i].mode.depositFee},减免金额${val[i].mode['LEASE']}\n`
+        // }
+        let vals = val[i]
+        str += `${vals.shopName}:`;
+        if (vals.mode.isFREE) {
+          str += `免费:减免金额${vals.mode["FREE"]},课程减免${vals.mode['courseFree'] ? vals.mode['courseFree'] : 0}\n`;
         }
-        if (val[i].mode.isGROUP) {
-          str += `团购:减免金额${val[i].mode['GROUP']}\n`
+        if (vals.mode.isGROUP) {
+          str += `团购:团购价${vals.mode["price"]},减免金额${vals.mode["GROUP"] ? vals.mode["GROUP"] : 0},课程减免${vals.mode['courseGroup'] ? vals.mode['courseGroup'] : 0}\n`;
         }
-        if (val[i].mode.isLEASE) {
-          str += `租赁:${val[i].mode.depositFee},减免金额${val[i].mode['LEASE']}\n`
+        if (vals.mode.isLEASE) {
+          str += `租赁:${vals.mode.depositFee},减免金额${vals.mode["LEASE"] ? vals.mode["LEASE"] : 0},课程减免${vals.mode['courseLease'] ? vals.mode['courseLease'] : 0}\n`;
         }
       }
       // if (val == 'FREE') {

+ 73 - 19
src/views/teamBuild/components/teamBaseInfo.vue

@@ -227,6 +227,9 @@
                    placeholder="请输入"
                    v-model.trim="checkList.soundInfo.value" />
           </div>
+          <div class="inputWrap">
+            <el-checkbox v-model="checkList.soundInfo.checkBuy">是否可选择购买</el-checkbox>
+          </div>
         </div>
         <div class="checkRow">
           <el-checkbox label="乐团合奏训练"
@@ -237,16 +240,8 @@
                    placeholder="请输入"
                    v-model.trim="checkList.allInfo.value" />
           </div>
-        </div>
-        <div class="checkRow">
-          <el-checkbox label="网络基础训练"
-                       v-model.trim="checkList.baseInfo.ischeck"></el-checkbox>
           <div class="inputWrap">
-            单价:
-            <input type="number"
-                   @mousewheel.native.prevent
-                   placeholder="请输入"
-                   v-model.trim="checkList.baseInfo.value" />
+            <el-checkbox v-model="checkList.allInfo.checkBuy">是否可选择购买</el-checkbox>
           </div>
         </div>
         <div class="checkRow">
@@ -259,6 +254,9 @@
                    placeholder="请输入"
                    v-model.trim="checkList.holidayInfo.value" />
           </div>
+          <div class="inputWrap">
+            <el-checkbox v-model="checkList.holidayInfo.checkBuy">是否可选择购买</el-checkbox>
+          </div>
         </div>
         <div class="checkRow"
              v-if="checkList.networkInfo">
@@ -271,6 +269,23 @@
                    placeholder="请输入"
                    v-model.trim="checkList.networkInfo.value" />
           </div>
+          <div class="inputWrap">
+            <el-checkbox v-model="checkList.networkInfo.checkBuy">是否可选择购买</el-checkbox>
+          </div>
+        </div>
+        <div class="checkRow">
+          <el-checkbox label="网络基础训练"
+                       v-model.trim="checkList.baseInfo.ischeck"></el-checkbox>
+          <div class="inputWrap">
+            单价:
+            <input type="number"
+                   @mousewheel.native.prevent
+                   placeholder="请输入"
+                   v-model.trim="checkList.baseInfo.value" />
+          </div>
+          <div class="inputWrap">
+            <el-checkbox v-model="checkList.baseInfo.checkBuy">是否可选择购买</el-checkbox>
+          </div>
         </div>
         <div class="checkRow">
           <el-checkbox label="课程提示"
@@ -455,26 +470,31 @@ export default {
         soundInfo: {
           // 声部
           ischeck: false,
-          value: ""
+          value: "",
+          checkBuy: false
         },
         allInfo: {
           // 合奏
           ischeck: false,
-          value: ""
+          value: "",
+          checkBuy: false
         },
         baseInfo: {
           // 基础
           ischeck: false,
-          value: ""
+          value: "",
+          checkBuy: false
         },
         holidayInfo: {
           // 假期
           ischeck: false,
-          value: ""
+          value: "",
+          checkBuy: false
         },
         networkInfo: {
           ischeck: false,
-          value: ""
+          value: "",
+          checkBuy: false
         },
         submit: {
           ischeck: false,
@@ -561,6 +581,42 @@ export default {
       console.log(val == "ONLINE")
     },
     init () {
+      this.checkList = {
+        soundInfo: {
+          // 声部
+          ischeck: false,
+          value: "",
+          checkBuy: false
+        },
+        allInfo: {
+          // 合奏
+          ischeck: false,
+          value: "",
+          checkBuy: false
+        },
+        baseInfo: {
+          // 基础
+          ischeck: false,
+          value: "",
+          checkBuy: false
+        },
+        holidayInfo: {
+          // 假期
+          ischeck: false,
+          value: "",
+          checkBuy: false
+        },
+        networkInfo: {
+          ischeck: false,
+          value: "",
+          checkBuy: false
+        },
+        submit: {
+          ischeck: false,
+          value:
+            "年度安排个月共xxx课时,课时,原价xxx元,现价xxxx元/月(约 xxxx元/课时 )"
+        }
+      }
       this.isInit = true;
       // 分为3种  this.teamStatus
       //          1.resetTeam 乐团修改
@@ -602,15 +658,13 @@ export default {
             this.topFrom.feeType = res.data.musicGroup.feeType ? res.data.musicGroup.feeType : null;
             // 课程组成形式
             this.checkList = JSON.parse(res.data.musicGroup.courseForm);
-            if (this.checkList.networkInfo) {
-
-            } else {
+            if (!this.checkList.networkInfo) {
               this.$set(this.checkList, 'networkInfo', {
                 ischeck: false,
-                value: ""
+                value: "",
+                checkBuy: false
               })
             }
-
             // 付费方式和周期
             for (let i in res.data.musicGroupPaymentEntities) {
               if (res.data.musicGroupPaymentEntities[i].name == "学校") {

+ 213 - 98
src/views/teamBuild/components/teamSoundMoney.vue

@@ -89,7 +89,7 @@
           </template>
         </el-table-column>
         <el-table-column label="乐器提供方式"
-                         width="200"
+                         width="300"
                          align="center"
                          prop="fangshi">
           <template slot-scope="scope">
@@ -293,53 +293,48 @@
              v-if="courseScheduleInfo ">
           <h2 class="title line_bottom">课程</h2>
           <div class="options classInfo">
-            <div class="option"
-                 v-if="courseScheduleInfo.soundInfo.ischeck">
-              <div class="0_hd">
-                <i class="check_default check_active"></i>
-              </div>
-              <div class="o_bd">乐团声部训练</div>
-              <span class="o_ft">现价:¥{{ courseScheduleInfo.soundInfo.value ? courseScheduleInfo.soundInfo.value : 0 }}</span>
-            </div>
-            <div class="option"
-                 v-if="courseScheduleInfo.allInfo.ischeck">
-              <div class="0_hd">
-                <i class="check_default check_active"></i>
-              </div>
-              <div class="o_bd">乐团合奏训练</div>
-              <span class="o_ft">现价:¥{{ courseScheduleInfo.allInfo.value ? courseScheduleInfo.allInfo.value : 0 }}</span>
-            </div>
-            <div class="option"
-                 v-if="courseScheduleInfo.baseInfo.ischeck">
-              <div class="0_hd">
-                <i class="check_default check_active"></i>
-              </div>
-              <div class="o_bd">网络基础训练</div>
-              <span class="o_ft">现价:¥{{ courseScheduleInfo.baseInfo.value ? courseScheduleInfo.baseInfo.value : 0 }}</span>
-            </div>
-            <div class="option"
-                 v-if="courseScheduleInfo.holidayInfo.ischeck">
-              <div class="0_hd">
-                <i class="check_default check_active"></i>
-              </div>
-              <div class="o_bd">假期集中训练</div>
-              <span class="o_ft">现价:¥{{ courseScheduleInfo.holidayInfo.value ? courseScheduleInfo.holidayInfo.value : 0 }}</span>
-            </div>
-            <div class="option"
-                 v-if="courseScheduleInfo.networkInfo.ischeck">
-              <div class="0_hd">
-                <i class="check_default check_active"></i>
-              </div>
-              <div class="o_bd">乐团云课堂</div>
-              <span class="o_ft">现价:¥{{ courseScheduleInfo.networkInfo.value ? courseScheduleInfo.networkInfo.value : 0 }}</span>
-            </div>
+            <div class="option" v-if="courseScheduleInfo.soundInfo.ischeck" @click="onCourseChange(courseScheduleInfo.soundInfo)">
+                    <div class="0_hd" :style="courseScheduleInfo.soundInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.soundInfo.isStatus ? 'check_active' : '']"></i></div>
+                    <div class="o_bd">乐团声部训练</div>
+                    <span class="o_ft">
+                        原价:¥{{ courseScheduleInfo.soundInfo.value ? courseScheduleInfo.soundInfo.value : 0 }}
+                    </span>
+                </div>
+                <div class="option" v-if="courseScheduleInfo.allInfo.ischeck" @click="onCourseChange(courseScheduleInfo.allInfo)">
+                    <div class="0_hd" :style="courseScheduleInfo.allInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.allInfo.isStatus ? 'check_active' : '']"></i></div>
+                    <div class="o_bd">乐团合奏训练</div>
+                    <span class="o_ft">
+                        原价:¥{{ courseScheduleInfo.allInfo.value ? courseScheduleInfo.allInfo.value : 0 }}
+                    </span>
+                </div>
+                <div class="option" v-if="courseScheduleInfo.holidayInfo.ischeck" @click="onCourseChange(courseScheduleInfo.holidayInfo)">
+                    <div class="0_hd" :style="courseScheduleInfo.holidayInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.holidayInfo.isStatus ? 'check_active' : '']"></i></div>
+                    <div class="o_bd">假期集中训练</div>
+                    <span class="o_ft">
+                        原价:¥{{ courseScheduleInfo.holidayInfo.value ? courseScheduleInfo.holidayInfo.value : 0 }}
+                    </span>
+                </div>
+                <div class="option" v-if="courseScheduleInfo.networkInfo && courseScheduleInfo.networkInfo.ischeck"  @click="onCourseChange(courseScheduleInfo.networkInfo)">
+                    <div class="0_hd" :style="courseScheduleInfo.networkInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.networkInfo.isStatus ? 'check_active' : '']"></i></div>
+                    <div class="o_bd">乐团云课堂</div>
+                    <span class="o_ft">
+                        原价:¥{{ courseScheduleInfo.networkInfo.value ? courseScheduleInfo.networkInfo.value : 0 }}
+                    </span>
+                </div>
+                <div class="option" v-if="courseScheduleInfo.baseInfo.ischeck" @click="onCourseChange(courseScheduleInfo.baseInfo)">
+                    <div class="0_hd" :style="courseScheduleInfo.baseInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.baseInfo.isStatus ? 'check_active' : '']"></i></div>
+                    <div class="o_bd">网络基础训练</div>
+                    <span class="o_ft">
+                        原价:¥{{ courseScheduleInfo.baseInfo.value ? courseScheduleInfo.baseInfo.value : 0 }}
+                    </span>
+                </div>
           </div>
           <div class="options sale"
                v-if="lookPreviewRow&&lookPreviewRow.yuji"
                :class="[courseScheduleStatus?'lines':'']">
             <div class="option">
-              <div class="o_bd">课程费用</div>
-              <span class="o_ft">¥{{ lookPreviewRow.yuji }}</span>
+              <div class="o_bd">现价</div>
+              <span class="o_ft">¥{{ orderInfo.coursePrice }}</span>
             </div>
           </div>
           <div class="coutInfo"
@@ -605,7 +600,8 @@
             <div class="item">{{ item.shopName}}</div>
             <div class="item">提供方式</div>
             <div class="item">提供方式对应金额</div>
-            <div class="item">减免金额</div>
+            <div class="item">乐器费用减免</div>
+            <div class="item">课程费用减免</div>
           </div>
 
           <div class="lineWrap">
@@ -627,6 +623,13 @@
                         v-model.trim="item.mode.GROUP"
                         @input="groupInput(item)"></el-input>
             </div>
+            <div class="item">
+              <el-input style="width:80%"
+                        type="number"
+                        @mousewheel.native.prevent
+                        v-model.trim="item.mode.courseGroup"
+                        @input="groupCourseInput(item)"></el-input>
+            </div>
           </div>
 
           <div class="lineWrap">
@@ -651,6 +654,10 @@
                         @input="deposiInput(item)"
                         v-model.trim="item.mode.LEASE"></el-input>
             </div>
+            <div class="item">
+              <el-input style="width:80%" disabled
+                        type="number"></el-input>
+            </div>
           </div>
 
           <div class="lineWrap">
@@ -668,6 +675,10 @@
                         @mousewheel.native.prevent
                         disabled></el-input>
             </div>
+            <div class="item">
+              <el-input style="width:80%" disabled
+                        type="number"></el-input>
+            </div>
           </div>
         </div>
       </div>
@@ -745,6 +756,13 @@ export default {
   //   this.init();
   // },
   methods: {
+    onCourseChange(item) {
+        // 判断用户是否可以选择
+        if(item.checkBuy) {
+            item.isStatus = !item.isStatus
+            this.calcPrice()
+        }
+    },
     init () {
       if (this.$route.query.search) {
         this.Fsearch = this.$route.query.search;
@@ -820,13 +838,14 @@ export default {
                 if (res.code == 200) {
                   this.activeSoundList = res.data.musicGroupSubjectPlans.map(
                     item => {
+                      console.log(item)
                       let fangshi = [];
                       res.data.musicGroupSubjectGoodsGroups.forEach(sub => {
                         if (
                           sub.subjectId == item.subjectId &&
                           sub.type == "INSTRUMENT"
                         ) {
-                          let FREE, LEASE, GROUP;
+                          let FREE,  courseFree, LEASE, courseLease, GROUP, courseGroup;
                           let isFREE = false;
                           let isLEASE = false;
                           let isGROUP = false;
@@ -838,35 +857,42 @@ export default {
                               sub.kitGroupPurchaseTypeJson
                             );
 
-                            if (
-                              expectJson &&
-                              expectJson.hasOwnProperty("FREE")
-                            ) {
+                            if (expectJson && expectJson.hasOwnProperty("FREE")) {
                               FREE = expectJson.FREE;
                               isFREE = true;
                             }
-                            if (
-                              expectJson &&
-                              expectJson.hasOwnProperty("LEASE")
-                            ) {
+                            if (expectJson && expectJson.hasOwnProperty("LEASE")) {
                               LEASE = expectJson.LEASE;
                               isLEASE = true;
                             }
-                            if (
-                              expectJson &&
-                              expectJson.hasOwnProperty("GROUP")
-                            ) {
+                            if (expectJson && expectJson.hasOwnProperty("GROUP")) {
                               GROUP = expectJson.GROUP;
                               isGROUP = true;
                             }
                           }
+                          if(sub.coursePurchaseTypeJson) {
+                            let courseJson = JSON.parse(sub.coursePurchaseTypeJson)
+                            if (courseJson && courseJson.hasOwnProperty("FREE")) {
+                              courseFree = courseJson.FREE;
+                            }
+                            if (courseJson && courseJson.hasOwnProperty("LEASE")) {
+                              courseLease = courseJson.LEASE;
+                            }
+                            if (courseJson && courseJson.hasOwnProperty("GROUP")) {
+                              courseGroup = courseJson.GROUP;
+                            }
+                          }
                           fangshi.push({
                             shopName: sub.name,
                             id: sub.goodsIdList,
                             mode: {
+                              courseFree: courseFree || 0,
+                              courseLease: courseLease || null,
+                              courseGroup: courseGroup || 0,
+                              yuji: item.fee,
                               FREE: FREE || 0,
                               GROUP: GROUP || 0,
-                              LEASE: LEASE || 0,
+                              LEASE: LEASE || null,
                               depositFee: depositFee || 0, // 保证金
                               price: price || 0, // 团购价
                               marketPrice: marketPrice || 0, // 商品原价
@@ -994,8 +1020,14 @@ export default {
       this.topfor = this.$store.getters.topinfo;
       this.checkfor = this.$store.getters.checkinfo;
       this.$nextTick(res => {
-        // console.log(this.$store.getters.checkinfo);
-        this.courseScheduleInfo = this.$store.getters.checkinfo;
+        let tempInfo = this.$store.getters.checkinfo
+        // 默认课程都选中
+        tempInfo.soundInfo.isStatus = true
+        tempInfo.allInfo.isStatus = true
+        tempInfo.baseInfo.isStatus = true
+        tempInfo.holidayInfo.isStatus = true
+        tempInfo.networkInfo.isStatus = true
+        this.courseScheduleInfo = tempInfo;
         //  console.log(this.courseScheduleInfo)
       });
       //  console.log(this.$store.getters.payList)
@@ -1203,6 +1235,7 @@ export default {
             });
             let kitGroupPurchaseTypeJson = null;
             let depositFee, price;
+            let coursePurchaseTypeJson = null;
             active.fangshi.forEach(fs => {
               if (fs.id == zl) {
                 depositFee = fs.mode.depositFee;
@@ -1221,6 +1254,21 @@ export default {
                 if (kitGroupPurchaseTypeJson.length <= 0) {
                   kitGroupPurchaseTypeJson = null;
                 }
+
+                let courseTypes = {}
+                if(fs.mode.courseFree) {
+                  courseTypes.FREE = fs.mode.courseFree
+                }
+                if(fs.mode.courseGroup) {
+                  courseTypes.GROUP = fs.mode.courseGroup ? fs.mode.courseGroup : 0
+                }
+                if(fs.mode.courseLease) {
+                  courseTypes.LEASE = fs.mode.courseLease
+                }
+                coursePurchaseTypeJson = JSON.stringify(courseTypes)
+                if (coursePurchaseTypeJson.length <= 0) {
+                  coursePurchaseTypeJson = null;
+                }
               }
             });
             let some = {
@@ -1230,6 +1278,7 @@ export default {
               name: goodsItem.name,
               price,
               kitGroupPurchaseTypeJson,
+              coursePurchaseTypeJson,
               depositFee
             };
             obj.musicGroupSubjectGoodsGroups.push(some);
@@ -1306,6 +1355,7 @@ export default {
             });
             let kitGroupPurchaseTypeJson = null;
             let depositFee, price;
+            let coursePurchaseTypeJson = null;
             active.fangshi.forEach(fs => {
               if (fs.id == zl) {
                 depositFee = fs.mode.depositFee;
@@ -1316,7 +1366,7 @@ export default {
                   types.FREE = fs.mode.FREE;
                 }
                 if (fs.mode.isGROUP) {
-                  types.GROUP = fs.mode.GROUP;
+                  types.GROUP = fs.mode.GROUP ? fs.mode.GROUP : 0;
                 }
                 if (fs.mode.isLEASE) {
                   types.LEASE = fs.mode.LEASE;
@@ -1325,6 +1375,21 @@ export default {
                 if (kitGroupPurchaseTypeJson.length <= 0) {
                   kitGroupPurchaseTypeJson = null;
                 }
+
+                let courseTypes = {}
+                if(fs.mode.courseFree) {
+                  courseTypes.FREE = fs.mode.courseFree
+                }
+                if(fs.mode.courseGroup) {
+                  courseTypes.GROUP = fs.mode.courseGroup ? fs.mode.courseGroup : 0
+                }
+                if(fs.mode.courseLease) {
+                  courseTypes.LEASE = fs.mode.courseLease
+                }
+                coursePurchaseTypeJson = JSON.stringify(courseTypes)
+                if (coursePurchaseTypeJson.length <= 0) {
+                  coursePurchaseTypeJson = null;
+                }
               }
             });
             let some = {
@@ -1333,6 +1398,7 @@ export default {
               goodsIdList: zl,
               name: goodsItem.name,
               kitGroupPurchaseTypeJson,
+              coursePurchaseTypeJson,
               depositFee,
               price
             };
@@ -1445,6 +1511,7 @@ export default {
     // 设置乐器提供方式
     setGiveMode (row) {
       // goodsList
+      console.log(row)
       if (row.zhonglei.length <= 0) {
         this.$message.error("请先选择乐器规格");
         return;
@@ -1452,7 +1519,11 @@ export default {
       // row.fangshi = []
       // row.zhonglei
       // row.goodsList
+      const tyuji = row.yuji
       if (row.fangshi[0] && row.fangshi[0].mode) {
+        row.fangshi.forEach(item => {
+          item.mode.yuji = tyuji
+        })
       } else {
         for (let i in row.goodsList) {
           for (let j in row.zhonglei) {
@@ -1461,9 +1532,13 @@ export default {
                 shopName: row.goodsList[i].name,
                 id: row.goodsList[i].id,
                 mode: {
+                  yuji: tyuji,
                   FREE: 0,
                   GROUP: 0,
                   LEASE: 0,
+                  courseFree: 0,
+                  courseLease: null,
+                  courseGroup: 0,
                   depositFee: 1500, // 保证金
                   price: row.goodsList[i].groupPurchasePrice, // 团购价
                   marketPrice: row.goodsList[i].marketPrice, // 原价
@@ -1476,7 +1551,7 @@ export default {
           }
         }
       }
-
+      console.log(row)
       this.editSound = row;
       this.reductionVisible = true;
     },
@@ -1493,6 +1568,13 @@ export default {
         item.mode.GROUP = item.mode.price;
       }
     },
+    groupCourseInput(item) {
+      console.log(item)
+      let mode = item.mode
+      if(mode.yuji - mode.courseGroup < 0) {
+        mode.courseGroup = mode.yuji
+      }
+    },
     deposiInput (item) {
       if (item.mode.depositFee - item.mode.LEASE < 0) {
         item.mode.LEASE = item.mode.depositFee;
@@ -1540,40 +1622,67 @@ export default {
         goodsIds = [],
         contractGoodsIds = ""; // 合同所需要的商品Id (只需要乐器编号)
       // 课程 this.topfor payfor checkfor
-
       let mgs = this.lookPreviewRow.yuji;
+      let coursePrice = Number(mgs)
       let csi = this.checkfor;
       // 加上判断是否有课程信息
       if (mgs) {
-        amount += parseFloat(mgs);
-        if (csi.allInfo.ischeck) {
-          marketPrice += parseFloat(csi.allInfo.value ? csi.allInfo.value : 0);
+        console.log(csi)
+        // amount += parseFloat(mgs);
+        const allInfo = csi.allInfo
+        if (allInfo.ischeck) {
+          const value = Number(parseFloat(allInfo.value ? allInfo.value : 0))
+          if(allInfo.isStatus) {
+            marketPrice += value;
+          }
+          if(allInfo.isStatus && allInfo.checkBuy) {
+            coursePrice += parseFloat(allInfo.checkBuy ? value : 0)
+          }
         }
-        if (csi.baseInfo.ischeck) {
-          marketPrice += parseFloat(
-            csi.baseInfo.value ? csi.baseInfo.value : 0
-          );
+        const baseInfo = csi.baseInfo
+        if (baseInfo.ischeck) {
+          const value = parseFloat(baseInfo.value ? baseInfo.value : 0)
+          if(baseInfo.isStatus) {
+            marketPrice += value;
+          }
+          if(baseInfo.isStatus && baseInfo.checkBuy) {
+            coursePrice += parseFloat(baseInfo.checkBuy ? value : 0)
+          }
         }
-        if (csi.holidayInfo.ischeck) {
-          marketPrice += parseFloat(
-            csi.holidayInfo.value ? csi.holidayInfo.value : 0
-          );
+        const holidayInfo = csi.holidayInfo
+        if (holidayInfo.ischeck) {
+          const value = parseFloat(holidayInfo.value ? holidayInfo.value : 0)
+          if(holidayInfo.isStatus) {
+            marketPrice += value
+          }
+          if(holidayInfo.isStatus && holidayInfo.checkBuy) {
+            coursePrice += parseFloat(holidayInfo.checkBuy ? value : 0)
+          }
         }
-        if (csi.soundInfo.ischeck) {
-          marketPrice += parseFloat(
-            csi.soundInfo.value ? csi.soundInfo.value : 0
-          );
+        const soundInfo = csi.soundInfo
+        if (soundInfo.ischeck) {
+          const value = parseFloat(soundInfo.value ? soundInfo.value : 0)
+          if(soundInfo.isStatus) {
+            marketPrice += value;
+          }
+          if(soundInfo.isStatus && soundInfo.checkBuy) {
+            coursePrice += parseFloat(soundInfo.checkBuy ? value : 0)
+          }
         }
-        if (csi.networkInfo.ischeck) {
-          marketPrice += parseFloat(
-            csi.networkInfo.value ? csi.networkInfo.value : 0
-          );
+        const networkInfo = csi.networkInfo
+        if (networkInfo.ischeck) {
+          const value = parseFloat(networkInfo.value ? networkInfo.value : 0)
+          if(networkInfo.isStatus) {
+            marketPrice += value;
+          }
+          if(networkInfo.isStatus && networkInfo.checkBuy) {
+            coursePrice += parseFloat(networkInfo.checkBuy ? value : 0)
+          }
         }
       }
-      // 乐器
 
       let ir = this.lookPreviewRow.fangshi;
-
+      let courseCouponPrice = 0
       if (ir.length > 0) {
         ir.forEach(item => {
           if (item.checked) {
@@ -1584,9 +1693,11 @@ export default {
               // 免费
               amount += 0;
               couponPrice = 0; // 优惠金额
+              courseCouponPrice = 0
             } else if (item.chiosetype == "LEASE") {
               // 租赁
               couponPrice = parseFloat(item.mode.LEASE); // 优惠金额
+              courseCouponPrice = parseFloat(item.mode.courseLease || 0)
               if (item.name != "自备") {
                 amount += parseFloat(item.mode.depositFee);
               } else {
@@ -1596,16 +1707,18 @@ export default {
               //团购
               amount += parseFloat(item.mode.price);
               couponPrice = parseFloat(item.mode.GROUP);
+              courseCouponPrice = parseFloat(item.mode.courseGroup)
             }
-            marketPrice += parseFloat(item.mode.marketPrice);
-            // item.id ? goodsGroupIds[item.id] : null
-            // if (item.id) {
-            //   goodsGroupIds[item.id] = item.kitType;
-            // }
+            marketPrice += parseFloat(item.mode.marketPrice)
           }
         });
       }
-
+      if(coursePrice - Number(courseCouponPrice) >= 0) {
+        coursePrice = Number((coursePrice - courseCouponPrice).toFixed(2))
+      } else {
+        coursePrice = 0
+      }
+      amount += parseFloat(coursePrice);
       // console.log(this.lookPreviewRow.markList)
       // 辅件
       if (this.lookPreviewRow.markList.length > 0) {
@@ -1673,7 +1786,8 @@ export default {
         couponPrice: couponPrice,
         goodsGroupIds: goodsGroupIds,
         goodsIds: goodsIds.join(","),
-        contractGoodsIds: contractGoodsIds
+        contractGoodsIds: contractGoodsIds,
+        coursePrice: coursePrice
       };
     },
     getAccessoryPrice (val) {
@@ -1731,15 +1845,16 @@ export default {
     fangshiFilter (val, price) {
       let str = "";
       for (let i in val) {
-        str += `${val[i].shopName}:`;
-        if (val[i].mode.isFREE) {
-          str += `免费:减免金额${val[i].mode["FREE"]}\n`;
+        let vals = val[i]
+        str += `${vals.shopName}:`;
+        if (vals.mode.isFREE) {
+          str += `免费:减免金额${vals.mode["FREE"]},课程减免${vals.mode['courseFree'] ? vals.mode['courseFree'] : 0}\n`;
         }
-        if (val[i].mode.isGROUP) {
-          str += `团购:团购价${val[i].mode["price"]},减免金额${val[i].mode["GROUP"]}\n`;
+        if (vals.mode.isGROUP) {
+          str += `团购:团购价${vals.mode["price"]},减免金额${vals.mode["GROUP"] ? vals.mode["GROUP"] : 0},课程减免${vals.mode['courseGroup'] ? vals.mode['courseGroup'] : 0}\n`;
         }
-        if (val[i].mode.isLEASE) {
-          str += `租赁:${val[i].mode.depositFee},减免金额${val[i].mode["LEASE"]}\n`;
+        if (vals.mode.isLEASE) {
+          str += `租赁:${vals.mode.depositFee},减免金额${vals.mode["LEASE"] ? vals.mode["LEASE"] : 0},课程减免${vals.mode['courseLease'] ? vals.mode['courseLease'] : 0}\n`;
         }
       }
       // if (val == 'FREE') {

+ 2 - 2
src/views/teamBuild/teamSeting/components/setImprovement.vue

@@ -5,9 +5,9 @@
                       content="基础技能班报名详情"></el-page-header>
       <!-- <div class='squrt'></div>  -->
       <!-- <span @click="onCreateQRCode" style="font-size: 16px; padding-left: 20px; font-weight: 400;cursor: pointer; ">查看报名连接</span> -->
-      <span @click="onApply"
+      <!-- <span @click="onApply"
             v-permission="'musicGroup/pushMessage'"
-            style="font-size: 16px; padding-left: 20px; font-weight: 400;cursor: pointer; color: #409eff;">开启报名</span>
+            style="font-size: 16px; padding-left: 20px; font-weight: 400;cursor: pointer; color: #409eff;">开启报名</span> -->
     </h2>
     <div class='m-core'>
       <div class="tableWrap">

部分文件因文件數量過多而無法顯示