mo před 2 roky
rodič
revize
7de0141d0e

+ 10 - 0
src/api/buildTeam.js

@@ -1633,3 +1633,13 @@ export function getAgreement(data) {
     params: data
   });
 }
+
+
+// 获取分部年纪
+export function getGradeList (data) {
+  return request({
+    url: api + '/organization/getGradeList',
+    method: 'get',
+    params: data
+  })
+}

+ 38 - 0
src/views/baseRulesManager/api.js

@@ -0,0 +1,38 @@
+import request2 from '@/utils/request2'
+import qs from 'qs'
+let api = '/api-web'
+
+export function getMusicGroupPlanMakingList(data) {
+  return request2({
+    url: api + '/musicGroupPlanMaking/queryAll',
+    method: 'get',
+    requestType:'form'
+  })
+}
+
+export function addMusicGroupPlanMaking(data) {
+  return request2({
+    url: api + '/musicGroupPlanMaking/add',
+    method: 'post',
+    data
+  })
+}
+
+export function updateMusicGroupPlanMaking(data) {
+  return request2({
+    url: api + '/musicGroupPlanMaking/update',
+    method: 'post',
+    data
+  })
+}
+
+
+// 根据编制id 查默认声部
+export function getMusicGroupPlanMakingDetail(data) {
+  return request2({
+    url: api + '/musicGroupPlanMaking/query',
+    method: 'get',
+    requestType:'form',
+    params:data
+  })
+}

+ 217 - 0
src/views/baseRulesManager/components/teamNo.vue

@@ -0,0 +1,217 @@
+
+<template>
+  <div>
+    <div>
+      <!-- 搜索标题 -->
+      <!-- <save-form
+        :inline="true"
+        class="searchForm"
+        ref="searchForm"
+        :model.sync="searchForm"
+        save-key="baseRulesManager-teamNo"
+      >
+        <el-form-item>
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="
+              (e) => {
+                e.target.blur();
+                $refs.searchForm.save();
+                search();
+              }
+            "
+            placeholder="编制名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="subjectId">
+          <el-select
+            v-model.trim="searchForm.subjectId"
+            clearable
+            filterable
+            placeholder="请选择声部"
+          >
+            <el-option
+              v-for="(item, index) in selects.subjects"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="search" type="primary">搜索</el-button>
+          <el-button @click="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form> -->
+      <div class="btnWraps">
+        <el-button @click="addNo" type="primary"   v-if="
+                  $helpers.permission(
+                    'musicGroupPlanMaking/add'
+                  )
+                ">新建编制</el-button>
+      </div>
+      <div class="tableWrap">
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column
+            align="center"
+            prop="id"
+            label="编号"
+            width="200px"
+          >
+          </el-table-column>
+          <el-table-column
+            align="center"
+            width="200px"
+            prop="name"
+            label="编制名称"
+          >
+          </el-table-column>
+          <el-table-column align="center" prop="subjectName" label="默认声部">
+
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="操作"
+            fixed="right"
+            width="200px"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="resetTeamNo(scope.row)"
+                type="text"
+                v-if="
+                  $helpers.permission(
+                    'musicGroupPlanMaking/update'
+                  )
+                "
+              >
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- <pagination
+          :total.sync="pageInfo.total"
+          save-key="baseRulesManager-teamNo"
+          sync
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        /> -->
+      </div>
+    </div>
+    <eidtTeamNo ref="eidtTeamNo" @getList="getList" />
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getEmployeeOrgan } from "@/api/buildTeam";
+import Tooltip from "@/components/Tooltip/index";
+import { auditTypeList, auditPaymentTypeList } from "@/utils/searchArray";
+import eidtTeamNo from "../modals/eidtTeamNo.vue";
+import { getMusicGroupPlanMakingList } from "../api";
+const initSearch = {
+  search: null,
+  paymentType: null,
+  status: "AUDITING",
+  organId: null,
+};
+export default {
+  components: { pagination, eidtTeamNo },
+  name: "helpCategory",
+  data() {
+    return {
+      typesStatus: false,
+      selList: [],
+      organList: [],
+      statusList: auditTypeList,
+      searchForm: { ...initSearch },
+      tableList: [{}],
+
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      detail: null,
+      typeStatus: false,
+    };
+  },
+  mounted() {
+    // this.$store.dispatch("setBranchs");
+    this.$store.dispatch("setSubjects");
+    this.getList();
+  },
+  methods: {
+    selectable(row, index) {
+      return row.status == "AUDITING";
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.$refs.searchForm.save(this.pageInfo, "page");
+      this.getList();
+    },
+    reset() {
+      this.searchForm = { ...initSearch };
+      this.search();
+    },
+    getList() {
+      let params = {
+        page: this.pageInfo.page,
+        rows: this.pageInfo.limit,
+        ...this.searchForm,
+      };
+      getMusicGroupPlanMakingList().then((res) => {
+        if (res.code == 200) {
+          let result = res.data.map((item) => {
+            let subjectNameArr = [];
+            if (item.subjectMap) {
+              for (let key in item.subjectMap) {
+                subjectNameArr.push(item.subjectMap[key]);
+              }
+            }
+            item.subjectName = subjectNameArr.join(",");
+            return item;
+          });
+          this.tableList = result;
+          // this.pageInfo.total = result.total;
+        }
+      });
+    },
+
+    addNo() {
+      this.$refs.eidtTeamNo.openDialog();
+    },
+    resetTeamNo(row){
+      this.$refs.eidtTeamNo.openDialog(row);
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+::v-deep .el-date-editor.el-input {
+  width: 100% !important;
+}
+::v-deep .el-select {
+  width: 100% !important;
+}
+::v-deep .el-table .cell {
+  display: -webkit-box;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 3;
+  -webkit-box-orient: vertical;
+}
+.btnWraps {
+  margin-bottom: 20px;
+}
+</style>

+ 10 - 7
src/views/baseRulesManager/index.vue

@@ -39,14 +39,15 @@
         >
           <leBaoRules v-if="activeIndex==1"/>
         </el-tab-pane>
-        <!-- <el-tab-pane
-          label="服务异常提醒"
+        <el-tab-pane
+          label="建团编制"
           lazy
-          name="4"
-          v-if="permissionList.earlyWarning"
+          name="5"
+          v-if="permission('musicGroupPlanMaking/queryAll')"
         >
-          <serverMinitor />
-        </el-tab-pane> -->
+
+          <teamNo v-if="activeIndex==5"/>
+        </el-tab-pane>
         <!-- <el-tab-pane
           label="机构参数设置"
           lazy
@@ -65,6 +66,7 @@ import leBaoRules from "@/views/courseRulersManager/components/leBaoRules";//
 import dayaTeamRules from "./components/dayaTeamRules";
 import goodsRules from "./components/goodsRules";
 import institutionRules from "./components/institutionRules";
+import teamNo from './components/teamNo'
 import otherRules from './components/otherRules'
 import { permission } from "@/utils/directivePage";
 export default {
@@ -74,7 +76,8 @@ export default {
     overallManager,
     dayaTeamRules,
     otherRules,
-    leBaoRules
+    leBaoRules,
+    teamNo
   },
   name: "baseRulersManager",
   data() {

+ 141 - 0
src/views/baseRulesManager/modals/eidtTeamNo.vue

@@ -0,0 +1,141 @@
+<template>
+  <div>
+    <el-dialog
+      :title="form.id ? '修改编制' : '新增编制'"
+      :visible.sync="teamNoVisible"
+      width="600px"
+    >
+      <el-form :model="form">
+        <el-form-item
+          label="编制名称"
+          prop="name"
+          :rules="[{ required: true, message: '编制名称不能为空' }]"
+        >
+          <el-input
+            placeholder="请输入编制名称"
+            v-model.trim="form.name"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item
+          label="默认声部"
+          prop="subjectIds"
+          :rules="[{ required: true, message: '默认声部不能为空' }]"
+        >
+          <el-select
+            v-model.trim="form.subjectIds"
+            clearable
+            filterable
+            multiple
+            placeholder="请选择声部"
+            collapse-tags
+          >
+            <el-option
+              v-for="(item, index) in selects.subjects"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            >
+            </el-option>
+          </el-select>
+          <div class="tagList">
+            <el-tag
+              v-for="tag in chioseSoundList"
+              :key="tag.name"
+              closable
+              style="margin-right: 5px"
+              @close="handleClose(tag)"
+            >
+              {{ tag.name }}
+            </el-tag>
+          </div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="teamNoVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submit"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { addMusicGroupPlanMaking,updateMusicGroupPlanMaking } from "../api";
+export default {
+  data() {
+    return {
+      form: {
+        id: "",
+        name: "",
+        subjectIds: [],
+      },
+      teamNoVisible: false,
+    };
+  },
+  mounted() {
+    this.$store.dispatch("setSubjects");
+  },
+  methods: {
+    openDialog(row) {
+      if(row&&row.id){
+        this.form  = {...row,subjectIds:row.subjectIdList.split(',').map((item)=>{return item*1} )}
+      }else{
+        this.form =  {
+        id: "",
+        name: "",
+        subjectIds: [],
+      }
+      }
+      this.teamNoVisible = true;
+    },
+    handleClose(tag) {
+      console.log(tag, "tag");
+      this.form.subjectIds.forEach((subjectId, index) => {
+        if (subjectId == tag.id) {
+          this.form.subjectIds.splice(index, 1);
+        }
+      });
+    },
+    async submit() {
+      try {
+        if (!this.form.id) {
+          const res = await addMusicGroupPlanMaking({
+            ...this.form,
+            subjectIdList: this.form.subjectIds.join(","),
+          });
+          this.$message.success("新增成功");
+        } else {
+          const res = await updateMusicGroupPlanMaking({
+            ...this.form,
+            subjectIdList: this.form.subjectIds.join(","),
+          });
+          this.$message.success("修改成功");
+        }
+        this.$emit('getList')
+        this.teamNoVisible = false
+      } catch (e) {
+        console.log(e);
+      }
+    },
+  },
+  computed: {
+    chioseSoundList() {
+      let arr = [];
+      this.selects.subjects.forEach((subject) => {
+        if (this.form.subjectIds.indexOf(subject.id) != -1) {
+          arr.push(subject);
+        }
+      });
+      return arr;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+::v-deep .el-form--inline {
+  .el-form-item__content {
+    display: block;
+  }
+}
+</style>

+ 30 - 1
src/views/categroyManager/specialSetup/branchSetting.vue

@@ -60,6 +60,12 @@
               {{ scope.row.gradeType | gradeTypeFormat }}
             </template>
           </el-table-column>
+          <el-table-column
+            align="center"
+            prop="maxMusicalInstrumentsProfits"
+            label="乐器分润上限"
+          >
+          </el-table-column>
           <el-table-column align="center" label="成立时间">
             <template slot-scope="scope">
               {{ scope.row.registerDate | formatTimer }}
@@ -197,6 +203,19 @@
           ></el-date-picker>
         </el-form-item>
         <el-form-item
+          label="乐器分润上限"
+          prop="maxMusicalInstrumentsProfits"
+          :label-width="formLabelWidth"
+        >
+          <el-input
+            v-model.trim="form.maxMusicalInstrumentsProfits"
+            placeholder="请输入乐器分润上限"
+            autocomplete="off"
+          >
+          <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
+        <el-form-item
           label="公司名称"
           prop="corporateName"
           :label-width="formLabelWidth"
@@ -438,7 +457,7 @@ export default {
         create: "添加分部",
         update: "修改分部",
       },
-      formLabelWidth: "100px",
+      formLabelWidth: "120px",
       branchStatus: false,
       provinceList: [], // 省列表
       cityList: [], // 市列表
@@ -458,6 +477,7 @@ export default {
         corporateCode: null,
         corporateSeal: null,
         corporateFinancialSeal: null,
+        maxMusicalInstrumentsProfits:null
       },
       rules: {
         name: [{ required: true, message: "请输入分部名称", trigger: "blur" }],
@@ -472,6 +492,14 @@ export default {
         gradeType: [
           { required: true, message: "请选择学年制", trigger: "change" },
         ],
+        maxMusicalInstrumentsProfits: [
+          { required: true, message: "请输入乐器分润上线", trigger: "change" },
+          {
+            pattern:
+              /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+            message: "请输入正确的金额",
+          },
+        ],
       },
       codeStatus: false,
       qrCodeUrl: null,
@@ -644,6 +672,7 @@ export default {
                 corporateCode: row.corporateCode,
                 corporateSeal: row.corporateSeal,
                 corporateFinancialSeal: row.corporateFinancialSeal,
+                maxMusicalInstrumentsProfits:row.maxMusicalInstrumentsProfits
               };
             });
             this.branchStatus = true;

+ 68 - 8
src/views/resetTeaming/components/payInfoDetail.vue

@@ -174,6 +174,7 @@
                 @create="addActive"
                 @remove="removeActive"
               />
+              <paySchoolInfo :form="form" />
             </div>
             <div class="teamCourseList coreList">
               <div class="coreTitle">
@@ -223,6 +224,41 @@
                     </el-date-picker>
                   </el-form-item>
                 </el-col>
+                <el-col style="width: 430px">
+                  <!--           :rules="[
+                      {
+                        required: true,
+                        message: '请选择缴费时间',
+                        trigger: 'blur',
+                      },
+                    ]" -->
+                  <el-form-item prop="paymentDate" ref="paymentDate">
+                    <template slot="label">
+                      <p style="position: relative">
+                        <!-- <span style="color: #f56c6c; margin-right: 4px">*</span> -->
+                        是否展示售价
+                        <!-- <el-tooltip placement="top" popper-class="mTooltip">
+                          <div slot="content">在该时间段内学员才可缴费</div>
+                          <i
+                            class="el-icon-question"
+                            style="
+                              font-size: 18px;
+                              color: #f56c6c;
+                              position: relative;
+                              top: 2px;
+                            "
+                          ></i>
+                        </el-tooltip> -->
+                      </p>
+                    </template>
+                    <el-select v-model="form.isShowSalePrice">
+                      <el-option label="是" :value="true"> </el-option>
+                      <el-option label="否" :value="false"> </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
                 <el-col class="memoWrap">
                   <el-form-item
                     class="memoWrapItem"
@@ -257,8 +293,9 @@
 
                     <el-input
                       style="width: 100%"
-                      :rows="1"
+                      :rows="3"
                       v-model="form.memo"
+                      type="textarea"
                       maxlength="50"
                       show-word-limit
                     ></el-input>
@@ -327,6 +364,7 @@ import payTeamCourse from "../modals/payTeamCourse";
 import payMember from "../modals/payMember";
 import payLeBao from "../modals/payLeBao";
 import payTeamActive from "../modals/payTeamActive";
+import paySchoolInfo from '../modals/paySchoolInfo'
 import numeral from "numeral";
 import dayjs from "dayjs";
 import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
@@ -356,6 +394,7 @@ export default {
     payLeBao,
     payTeamActive,
     subjectPreview,
+    paySchoolInfo
   },
   data() {
     return {
@@ -381,6 +420,7 @@ export default {
         isShowVipCourseForPay: true,
         isShowMusicCourseForPay: true,
         leixing: "1",
+        isShowSalePrice: true,
       },
       teamCourse: false,
       teamCourseDisabled: false,
@@ -502,10 +542,27 @@ export default {
               "payUserType",
               res.data?.calender?.payUserType
             );
-            this.$set(this.form, "isShowMemberForPay", res.data?.calender?.paymentItemShowState?.isShowMemberForPay);
-            this.$set(this.form, "isShowMusicInsuranceForPay", res.data?.calender?.paymentItemShowState?.isShowMusicInsuranceForPay);
-            this.$set(this.form, "isShowVipCourseForPay", res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay);
-            this.$set(this.form, "isShowMusicCourseForPay", res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay);
+            this.$set(
+              this.form,
+              "isShowMemberForPay",
+              res.data?.calender?.paymentItemShowState?.isShowMemberForPay
+            );
+            this.$set(
+              this.form,
+              "isShowMusicInsuranceForPay",
+              res.data?.calender?.paymentItemShowState
+                ?.isShowMusicInsuranceForPay
+            );
+            this.$set(
+              this.form,
+              "isShowVipCourseForPay",
+              res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay
+            );
+            this.$set(
+              this.form,
+              "isShowMusicCourseForPay",
+              res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay
+            );
             if (res.data.member) {
               // 团练保
               this.member = true;
@@ -906,7 +963,9 @@ export default {
           member: memberObj, // 云教练
           memberPrivilegesItemList: [], // 会员基本内容
           repair:
-            (form.leBaoList?.length > 0&&this.isShowLeBao&&this.$route.query.team_status != 'PROGRESS')
+            form.leBaoList?.length > 0 &&
+            this.isShowLeBao &&
+            this.$route.query.team_status != "PROGRESS"
               ? { ...form.leBaoList[0], optionalFlag: false }
               : null, // 乐保
         },
@@ -938,7 +997,7 @@ export default {
         musicGroupPaymentCalenderCourseSettingsList:
           this.form.eclass?.length > 0 ? this.form.eclass : null,
         musicGroupId: this.$route.query.id,
-        paymentItemShowState:  JSON.stringify({
+        paymentItemShowState: JSON.stringify({
           isShowMemberForPay: this.form.isShowMemberForPay,
           isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
           isShowVipCourseForPay: this.form.isShowVipCourseForPay,
@@ -1032,7 +1091,8 @@ export default {
 <style lang="scss" scoped>
 @import "~@/views/resetTeaming/modals/pay.scss";
 .memoWrap {
-  width: calc(100% - 430px);
+  // width: calc(100% - 860px);
+  width: 860px;
   .memoWrapItem {
     display: block;
     ::v-deep .el-form-item__content {

+ 3 - 6
src/views/resetTeaming/modals/pay.scss

@@ -19,12 +19,11 @@
     border-radius: 2px;
     left: 0;
     top: 11px;
-    content:''
+    content: "";
   }
 }
 
 .teamCourseList {
-
   margin-bottom: 15px;
   background-color: #fff;
   ::v-deep .el-radio-group {
@@ -50,8 +49,7 @@
     margin-top: 6px;
   }
 
-  ::v-deep .number-input .el-input__inner,
-  .number-input .el-input__inner {
+  :deep(.number-input .el-input__inner, .number-input .el-input__inner) {
     text-align: left;
   }
 }
@@ -60,12 +58,11 @@
   margin: 20px 0;
 }
 
-
 .titleFormItem {
   margin: 0;
   align-items: center;
 
-  ::v-deep .el-form-item__content {
+  :deep(.el-form-item__content) {
     margin-top: 3px;
   }
 }

+ 126 - 0
src/views/resetTeaming/modals/paySchoolInfo.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="teamCourseList">
+    <p class="coreTitle">
+      费用信息
+
+      <!-- <el-form-item
+        label="是否展示"
+        prop="isShowMusicInsuranceForPay"
+        v-if="allCourseCurrentPrice == 0"
+        class="titleFormItem"
+      >
+        <el-select
+          style="width: 100% !important"
+          v-model="form.isShowMusicInsuranceForPay"
+          placeholder="请选择是否展乐保费用"
+          size="mini"
+        >
+          <el-option label="是" :value="true"> </el-option>
+          <el-option label="否" :value="false"> </el-option>
+        </el-select>
+      </el-form-item> -->
+    </p>
+    <div class="infoWrap">
+      <el-form-item
+        label="计价标准"
+        class="vertical"
+        prop="isShowMusicInsuranceForPay"
+      >
+        <el-select
+
+          v-model="form.isShowMusicInsuranceForPay"
+          placeholder="请选择是否展乐保费用"
+        >
+          <el-option label="按学生" :value="true"> </el-option>
+          <el-option label="按老师" :value="false"> </el-option>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item
+        class="vertical"
+        label="学生人数"
+        prop="isShowMusicInsuranceForPay"
+      >
+        <el-input-number
+          :controls="false"
+          :min="0"
+          :precision="2"
+          type="number"
+        >
+        </el-input-number>
+      </el-form-item>
+      <div>
+        <el-form-item
+          class="vertical"
+          label="总金额"
+          prop="isShowMusicInsuranceForPay"
+        >
+          <el-input-number
+            :controls="false"
+            :min="0"
+            :precision="2"
+            type="number"
+          >
+          </el-input-number>
+        </el-form-item>
+        <el-form-item
+          class="vertical"
+          label="优惠金额"
+          prop="isShowMusicInsuranceForPay"
+        >
+          <el-input-number
+            :controls="false"
+            :min="0"
+            :precision="2"
+            type="number"
+          >
+          </el-input-number>
+        </el-form-item>
+        <el-form-item
+          class="vertical"
+          label="付款金额"
+          prop="isShowMusicInsuranceForPay"
+        >
+          <el-input-number  :controls="false"
+            :min="0"
+            :precision="2"> </el-input-number>
+        </el-form-item>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ["form", "leBaoInfo"],
+  data() {
+    return {
+      charges: [],
+      clearable: false,
+      isDisabled: false,
+      courseUnitPriceSettingsByType: [],
+      boolOptionsOptions: [],
+    };
+  },
+  methods: {},
+  computed: {},
+};
+</script>
+<style lang="scss" scoped>
+@import "~@/views/resetTeaming/modals/pay.scss";
+.infoWrap {
+  padding: 10px;
+  .vertical {
+    margin:0 0 20px !important;
+    .el-form-item__label {
+      text-align: left !important;
+    }
+  }
+  .el-input-number {
+    width: 180px;
+  }
+  ::v-deep .el-input-number .el-input__inner {
+    text-align: left;
+
+  }
+}
+</style>

+ 35 - 11
src/views/teamBuild/components/soundSetComponents/chioseMusic.vue

@@ -1,10 +1,12 @@
 <template>
   <div>
+    <el-form :model="item">
     <div v-for="(music, index) in item.chioseMusic" :key="index">
       <div class="chioseMusic">
         <div class="flexRow bigFlex">
           <div class="chioseWrap">
             <p class="title">可选乐器{{ index + 1 }}:</p>
+
             <el-select
               style="width: 180px"
               :disabled="basdisabled"
@@ -58,11 +60,18 @@
                   ? music.type.includes('GROUP')
                   : false
               "
-              style="width: 180px"
+              style="width: 180px;margin-top: 20px;"
             >
-              <el-input type="number" v-model="music.groupPrice" disabled>
-                <template slot="append">元</template></el-input
-              >
+
+                <el-form-item
+                  :prop="'chioseMusic.'+index+'.groupPrice'"
+                  :rules="[{ validator:(rule, value, callback)=> checkGroupPrice(rule, value, callback,music), trigger: 'blur' }]"
+                >
+                  <el-input type="number" v-model="music.groupPrice">
+                    <template slot="append">元</template></el-input
+                  >
+                </el-form-item>
+
             </div>
           </div>
           <div class="chioseWrap">
@@ -100,10 +109,7 @@
             ></i>
             <i
               class="el-icon-remove-outline marginLeft10 iconStyle"
-              v-if="
-                item.chioseMusic.length > 1 &&
-                !basdisabled
-              "
+              v-if="item.chioseMusic.length > 1 && !basdisabled"
               @click="deleteMusic(music)"
               style="font-size: 20px; cursor: pointer"
             ></i>
@@ -151,11 +157,12 @@
         >新增可选乐器</el-button
       >
     </div> -->
+  </el-form>
   </div>
 </template>
 <script>
 export default {
-  props: ["item", "basdisabled", "activeSoundList"],
+  props: ["item", "basdisabled", "activeSoundList",'dividend'],
   data() {
     return {
       radio: "",
@@ -164,8 +171,8 @@ export default {
   },
   created() {},
   mounted() {
-    console.log({...this.item})
-    if (this.item.chioseMusic.length < 1) {
+    console.log(this.dividend,'dividend')
+    if ( this.item.chioseMusic.length < 1) {
       this.item.chioseMusic.push({
         musical: "",
         type: [],
@@ -180,6 +187,7 @@ export default {
       this.item.goodsList.map((some, index) => {
         if (some.id == val) {
           music.groupPrice = some.groupPurchasePrice;
+          music.groupPurchasePrice = some.groupPurchasePrice;
         }
       });
     },
@@ -214,6 +222,18 @@ export default {
     changeFee(val, music) {
       this.$set(music, "groupRemissionCourseFee", val);
     },
+    checkGroupPrice(rule, value, callback,music) {
+      console.log(rule, value, this.dividend,music);
+      if (!value) {
+        callback(new Error("请输入团购价格"));
+      } else if (value*1 >(music.groupPurchasePrice+this.dividend)) {
+        callback(new Error(`团购金额不得大于${music.groupPurchasePrice+this.dividend}`));
+      } else if (value*1 <(music.groupPurchasePrice)) {
+        callback(new Error(`团购金额不得小于${music.groupPurchasePrice}`));
+      }else {
+        callback();
+      }
+    },
   },
   // watch: {
   //   item: {
@@ -278,5 +298,9 @@ p {
   justify-content: flex-start;
   align-items: center;
   margin-bottom: 10px;
+
 }
+:deep(.el-form-item) {
+    margin-bottom: 0!important;
+  }
 </style>

+ 29 - 10
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -52,6 +52,7 @@
               :item="item"
               @lookMusic="lookMusic"
               :basdisabled="basdisabled"
+              :dividend="dividend"
             />
             <div class="coreItemRow">
               <p class="title">教辅:</p>
@@ -109,7 +110,9 @@ import {
   findMusicGroupSubjectInfo,
   updateSubjectInfo,
   getSubjectGoods,
+  getTeamBaseInfo,
 } from "@/api/buildTeam";
+import { getMusicGroupPlanMakingDetail } from "@/views/baseRulesManager/api";
 import dayjs from "dayjs";
 import chioseSoundList from "./chioseSoundList";
 import chioseMusic from "./chioseMusic";
@@ -132,6 +135,7 @@ export default {
       basdisabled: false,
       teamid: "",
       isField: true,
+      dividend:0
     };
   },
   mounted() {
@@ -142,6 +146,11 @@ export default {
     this.$nextTick((res) => {
       this.init();
     });
+    getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
+      if (res.code == 200) {
+        this.dividend = res.data.maxMusicalInstrumentsProfits
+      }
+    });
   },
   deactivated() {
     window.removeEventListener("scroll", this.getScroll);
@@ -252,7 +261,6 @@ export default {
                         // 格式化商品和教辅
                         res.data.musicGroupSubjectGoodsGroups.forEach(
                           (shop) => {
-
                             let index = findIndex(this.activeSoundList, (o) => {
                               return o.id == shop.subjectId;
                             });
@@ -306,17 +314,28 @@ export default {
     getDefaultSubject() {
       let type = this.topfor.type;
       let section = this.topfor.section;
-      getDefaultSubject({
-        chargeTypeId: type,
-        organId: section,
-        number: 1,
+      let musicGroupPlanMakingId = this.topfor.musicGroupPlanMakingId;
+      getMusicGroupPlanMakingDetail({
+        id: musicGroupPlanMakingId,
       }).then(async (res) => {
         if (res.code == 200) {
           let activeSound = [];
-          this.activeSoundList = res.data.map((item) => {
-            activeSound.push(item.id);
-            return this.initSound(item);
-          });
+          this.activeSoundList = [];
+
+          for (let key in res.data.subjectMap) {
+            console.log(key, "key", res.data.subjectMap[key], "name");
+            activeSound.push(key * 1);
+            this.activeSoundList.push(
+              this.initSound({
+                id: key * 1,
+                name: res.data.subjectMap[key],
+              })
+            );
+          }
+          // this.activeSoundList = res.data.map((item) => {
+          //   activeSound.push(item.id);
+          //   return this.initSound(item);
+          // });
           this.activeSound = activeSound;
           this.chioseActiveSound = activeSound;
           await this.changeActiveSound(activeSound.join(","));
@@ -356,7 +375,6 @@ export default {
       this.soundVisible = false;
     },
     initSound(item) {
-
       let obj = {
         id: item.id,
         sound: item.name,
@@ -585,6 +603,7 @@ export default {
       if (this.teamStatus == "newTeam") {
       } else {
         obj.musicGroupId = this.teamid;
+        // 有type 到审核  没有 继续草稿
         if (type) {
           obj.musicGroupStatus = "AUDIT";
         } else {

+ 243 - 22
src/views/teamBuild/components/teamBaseInfo.vue

@@ -180,7 +180,7 @@
             placeholder="选择日期"
           ></el-date-picker>
         </el-form-item> -->
-        <el-form-item
+        <!-- <el-form-item
           label="报名截止时间"
           prop="time"
           :rules="[{ required: true, message: '请输入报名截止时间' }]"
@@ -193,7 +193,7 @@
             :picker-options="beginDate()"
             placeholder="选择日期"
           ></el-date-picker>
-        </el-form-item>
+        </el-form-item> -->
         <!-- <el-form-item
           label="预计开团时间"
           prop="startTime"
@@ -224,7 +224,11 @@
 
           </el-select>
         </el-form-item> -->
-        <el-form-item label="机构类型" prop="ownershipType" v-if="tenantId ==1">
+        <el-form-item
+          label="机构类型"
+          prop="ownershipType"
+          v-if="tenantId == 1"
+        >
           <el-select
             v-model.trim="topFrom.ownershipType"
             :disabled="basdisabled"
@@ -235,7 +239,11 @@
             value="LEASE"></el-option>-->
           </el-select>
         </el-form-item>
-           <el-form-item label="课外训练布置老师" prop="extracurricularTeacher" v-if="tenantId ==1">
+        <el-form-item
+          label="课外训练布置老师"
+          prop="extracurricularTeacher"
+          v-if="tenantId == 1"
+        >
           <el-select
             v-model.trim="topFrom.extracurricularTeacher"
             :disabled="basdisabled"
@@ -334,6 +342,133 @@
             </el-option>
           </el-select>
         </el-form-item>
+
+        <div v-if="tenantId == 1">
+          <div class="head">建团信息:</div>
+          <el-form-item
+            label="建团编制"
+            prop="musicGroupPlanMakingId"
+            :rules="[{ required: true, message: '建团编制不能为空' }]"
+          >
+            <el-select
+              v-model.trim="topFrom.musicGroupPlanMakingId"
+              filterable
+              :disabled="basdisabled"
+              clearable
+              @change="changeType"
+            >
+              <el-option
+                v-for="(item, index) in musicGroupPlanMakingList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="成团年级"
+            prop="firstRecruitGrade"
+            :rules="[{ required: true, message: '成团年级不能为空' }]"
+          >
+            <el-select
+              v-model.trim="topFrom.firstRecruitGrade"
+              filterable
+              :disabled="basdisabled || !topFrom.section"
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in gradeList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="收费标准"
+            prop="defaultChargeStandard"
+            :rules="[{ required: true, message: '收费标准不能为空' }]"
+          >
+            <el-input
+              v-model.trim="topFrom.defaultChargeStandard"
+              placeholder="请输入收费标准"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="单次训练时长"
+            prop="singleTrainMinutes"
+            :rules="[
+              { required: true, message: '请输入单次训练时长' },
+              {
+                pattern: /(^[0-9+]*$)/,
+                message: '请输入正确的时长',
+              },
+            ]"
+          >
+            <el-select
+              v-model.trim="topFrom.singleTrainMinutes"
+              filterable
+              :disabled="basdisabled"
+              allow-create
+              default-first-option
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in singleTrainMinutesList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="课程配置"
+            prop="coursePlan"
+            :rules="[{ required: true, message: '请选择课程配置' }]"
+          >
+            <el-select
+              v-model.trim="topFrom.coursePlan"
+              filterable
+              :disabled="basdisabled"
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in coursePlanList"
+                :key="index"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="毕业年级"
+            prop="graduateGrade"
+            :rules="[{ required: true, message: '毕业年级不能为空' }]"
+          >
+            <el-select
+              v-model.trim="topFrom.graduateGrade"
+              filterable
+              :disabled="basdisabled || !topFrom.firstRecruitGrade"
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in gradeList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+                :disabled="item.value < topFrom.firstRecruitGrade"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="销售活动" prop="saleActivityDesc">
+            <el-input
+              placeholder="请输入销售活动"
+              :maxlength="100"
+              v-model.trim="topFrom.saleActivityDesc"
+              show-word-limit
+            ></el-input>
+          </el-form-item>
+        </div>
         <div class="head">乐团设置:</div>
         <el-form-item
           label="同步群消息"
@@ -467,6 +602,7 @@ import {
   getOrganRole,
   getTeacher,
   createTeam,
+  getGradeList,
 } from "@/api/buildTeam";
 import dayjs from "dayjs";
 import merge from "webpack-merge";
@@ -474,7 +610,20 @@ import { queryByOrganId, getSchool } from "@/api/systemManage";
 import qrCode from "@/components/QrCode/index";
 import { classStatus, courseViewTypeList } from "@/utils/searchArray";
 import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
+import { getMusicGroupPlanMakingList } from "@/views/baseRulesManager/api";
 import mergeMusic from "../components/merge-music";
+const singleTrainMinutesList = [
+  { name: "90+90", id: "90+90" },
+  { name: "90+90+45", id: "90+90+45" },
+];
+const coursePlanList = [
+  { name: "PlanS", id: "PlanS" },
+  { name: "PlanA", id: "PlanA" },
+  { name: "PlanB", id: "PlanB" },
+  { name: "PlanC", id: "PlanC" },
+  { name: "PlanD", id: "PlanD" },
+  { name: "PlanE", id: "PlanE" },
+];
 export default {
   components: {
     mergeMusic,
@@ -513,7 +662,14 @@ export default {
         ownershipType: "OWN", // 合作机构类型
         repairUserId: null, // 维修技师
         transactionTeacherId: null, // 衔接老师
-        extracurricularTeacher:'NORMAL'
+        extracurricularTeacher: "NORMAL",
+        musicGroupPlanMakingId: "", //建团编制
+        firstRecruitGrade: "", // 成团年级
+        defaultChargeStandard: "", // 收费标准
+        singleTrainMinutes: "", //单次训练时长
+        coursePlan: "", // 课程计划
+        graduateGrade: "", // 毕业年级
+        saleActivityDesc: "", // 销售活动描述
       },
       baseInfo: {},
       money: 580,
@@ -530,6 +686,8 @@ export default {
       transactionList: [],
       addList: [], // 教学地点列表
       activeTeam: [],
+      gradeList: [], // 年级
+      gradeListObj: null,
       teamid: "",
       teamStatus: "",
       isInit: false,
@@ -566,6 +724,9 @@ export default {
       qrCodeUrl: null,
       codeTitle: null,
       tenantId: "",
+      coursePlanList: coursePlanList,
+      musicGroupPlanMakingList: [],
+      singleTrainMinutesList: singleTrainMinutesList,
     };
   },
   created() {},
@@ -703,7 +864,7 @@ export default {
       }
       this.teamStatus = this.$route.query.type;
       this.team_status = this.$route.query.team_status;
-      this.tenantId = this.$helpers.tenantId
+      this.tenantId = this.$helpers.tenantId;
       // if (this.teamStatus == "newTeam") {
       //   this.$store.dispatch("buildIndex", 0);
       // }
@@ -711,6 +872,14 @@ export default {
       // if (this.teamStatus != "newTeam") {
       //   this.$store.dispatch("draftIndex", 0);
       // }
+
+      // 获取建团编制
+      getMusicGroupPlanMakingList().then((res) => {
+        if (res.code == 200) {
+          this.musicGroupPlanMakingList = res.data;
+        }
+      });
+
       // 传过来的乐团信息
       this.activeTeam = this.getTeamList;
       if (
@@ -762,7 +931,7 @@ export default {
         // 如果是新建团
 
         let sotrage = JSON.parse(localStorage.getItem(`newTeambase`));
-        console.log(sotrage,this.topFrom)
+        console.log(sotrage, this.topFrom);
         sotrage ? (this.topFrom = sotrage) : this.topFrom;
         if (this.topFrom?.section) {
           // 获取员工
@@ -796,13 +965,12 @@ export default {
           let arr = [];
           if (this.sectionList.length <= 0) {
             arr.push("organ");
-          }else{
-            if(!this.topFrom.section){
-               this.$set(this.topFrom,'section',this.sectionList[0].id)
-               this.changeSection(this.sectionList[0].id)
-               // diao
+          } else {
+            if (!this.topFrom.section) {
+              this.$set(this.topFrom, "section", this.sectionList[0].id);
+              this.changeSection(this.sectionList[0].id);
+              // diao
             }
-
           }
           if (this.typeList.length <= 0) {
             arr.push("teamPayType");
@@ -820,11 +988,13 @@ export default {
       this.topFrom.head = "";
       this.topFrom.school = "";
       this.topFrom.address = "";
+      this.topFrom.firstRecruitGrade = "";
+      this.topFrom.graduateGrade = "";
+
       // 发请求 根据分部id 查询所有员工
-      if(val){
-         this.getBaseList(val);
+      if (val) {
+        this.getBaseList(val);
       }
-
     },
     async getBaseList(val) {
       // 合作单位
@@ -860,6 +1030,19 @@ export default {
           this.teacherList = res.data;
         }
       });
+      // 获取年级
+      getGradeList({ id: val }).then((res) => {
+        let result = res.data;
+        this.gradeListObj = res.data;
+        if (res.code == 200 && result) {
+          for (let i in result) {
+            this.gradeList.push({
+              value: i,
+              label: result[i],
+            });
+          }
+        }
+      });
       Promise.all([
         queryByOrganId({ organId: val }),
         getSchool({ organId: val }),
@@ -992,7 +1175,14 @@ export default {
               homeworkPushFlag: this.topFrom.homeworkPushFlag,
               isGiveAccessories: this.topFrom.isGiveAccessories,
               memberCourseShowFlag: this.topFrom.memberCourseShowFlag,
-              extracurricularTeacher:this.topFrom.extracurricularTeacher
+              extracurricularTeacher: this.topFrom.extracurricularTeacher,
+              musicGroupPlanMakingId: this.topFrom.musicGroupPlanMakingId,
+              firstRecruitGrade: this.topFrom.firstRecruitGrade,
+              defaultChargeStandard: this.topFrom.defaultChargeStandard,
+              singleTrainMinutes: this.topFrom.singleTrainMinutes,
+              coursePlan: this.topFrom.coursePlan,
+              graduateGrade: this.topFrom.graduateGrade,
+              saleActivityDesc: this.topFrom.saleActivityDesc,
             };
             // obj.musicGroupPaymentEntities = [];
             // createTeam
@@ -1112,7 +1302,14 @@ export default {
         homeworkPushFlag: 1,
         isGiveAccessories: 0,
         memberCourseShowFlag: 0,
-        extracurricularTeacher:'NORMAL'
+        extracurricularTeacher: "NORMAL",
+        musicGroupPlanMakingId: '',
+        firstRecruitGrade: '',
+        defaultChargeStandard: '',
+        singleTrainMinutes: '',
+        coursePlan: '',
+        graduateGrade: '',
+        saleActivityDesc: '',
       };
       this.$refs["topinfo"].resetFields();
     },
@@ -1351,9 +1548,33 @@ export default {
       this.topFrom.transactionTeacherId =
         res.data.musicGroup.transactionTeacherId || "";
       this.topFrom.homeworkPushFlag = res.data.musicGroup.homeworkPushFlag;
-      this.topFrom.isGiveAccessories = res.data.musicGroup.isGiveAccessories ? 1 : 0;
-      this.topFrom.memberCourseShowFlag = res.data.musicGroup.memberCourseShowFlag ? 1 : 0;
-       this.topFrom.extracurricularTeacher = res.data.musicGroup.extracurricularTeacher
+      this.topFrom.isGiveAccessories = res.data.musicGroup.isGiveAccessories
+        ? 1
+        : 0;
+      this.topFrom.memberCourseShowFlag = res.data.musicGroup
+        .memberCourseShowFlag
+        ? 1
+        : 0;
+      this.topFrom.extracurricularTeacher =
+        res.data.musicGroup.extracurricularTeacher;
+
+        this.topFrom.musicGroupPlanMakingId =
+        res.data.musicGroup.musicGroupPlanMakingId;
+        this.topFrom.firstRecruitGrade =
+        res.data.musicGroup.firstRecruitGrade;
+        this.topFrom.defaultChargeStandard =
+        res.data.musicGroup.defaultChargeStandard;
+        this.topFrom.singleTrainMinutes =
+        res.data.musicGroup.singleTrainMinutes;
+        this.topFrom.coursePlan =
+        res.data.musicGroup.coursePlan;
+        this.topFrom.graduateGrade =
+        res.data.musicGroup.graduateGrade;
+        this.topFrom.saleActivityDesc =
+        res.data.musicGroup.saleActivityDesc;
+
+
+
       localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
     },
     changeType(val) {
@@ -1555,7 +1776,7 @@ export default {
 </style>
 <style scoped lang="scss">
 .banseLeft {
-  ::v-deep .el-form--inline {
+  :deep(.el-form--inline) {
     .el-form-item__content {
       display: block;
     }

+ 1 - 1
src/views/teamDetail/teamList.vue

@@ -16,7 +16,7 @@
           type="primary"
           v-if="permission('musicGroup/createGroup')"
           @click="createNewTeam"
-          >新建乐团</el-button
+          >申请乐团</el-button
         >
       </div>