Kaynağa Gözat

添加机构充值

lex-xin 3 yıl önce
ebeveyn
işleme
4c650de92b

BIN
src/assets/images/icon_checkbox_default_disabled.png


BIN
src/assets/images/icon_checkbox_disable.png


+ 2 - 1
src/constant/index.js

@@ -359,7 +359,8 @@ export const organPayState = {
 export const tenantStatus = {
   "TENANT_OPEN": '机构开通缴费',
   "TENANT_RENEW": '机构续费',
-  "CLOUD_TEACHER": '激活团练宝'
+  "CLOUD_TEACHER": '激活团练宝',
+  "TENANT_RECHARGE": '机构充值'
 }
 //   "DAY": '天',
 export const memberEnum = {

+ 2 - 0
src/layout/components/Navbar.vue

@@ -373,6 +373,8 @@ export default {
             if(item.id == tenantForm.tenantId) {
               tenantName = item.name
               tenantLogo = item.logo
+              this.tenantName = item.name
+              this.tenantLogo = item.logo
             }
           });
           let tenantConfig = sessionStorage.getItem('tenantConfig')

+ 3 - 1
src/router/index.js

@@ -506,7 +506,9 @@ export const asyncRoutes = {
   // 扣费记录
   chargingRecord:() => import('@/views/tenantSetting/chargingRecord.vue'),
   // 操作手册管理
-  operationManual:() => import('@/views/operationManual')
+  operationManual:() => import('@/views/operationManual'),
+  // 产品服务
+  productService: () => import('@/views/productService')
 }
 
 export default router

+ 1 - 0
src/store/getters.js

@@ -4,6 +4,7 @@ const getters = {
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   name: state => state.user.name,
+  tenantId: state => state.user.tenantId,
   permission_routes: state => state.permission.routes,
   permission: state => state.permission.permission,
   organ: state => state.user.organ,

+ 10 - 2
src/store/modules/user.js

@@ -12,8 +12,11 @@ const state = {
   organName: '',
   phone: '',
   isSuperAdmin:false,
-  roles:[]
+  roles:[],
+  tenantId: null
 }
+
+let stateTenantId = null // 机构编号
 // organName
 const mutations = {
   SET_TOKEN: (state, token) => {
@@ -45,6 +48,9 @@ const mutations = {
   },
   SET_ROLES:(state,roles)=>{
     state.roles = roles
+  },
+  SET_TENANTID:(state,tenantId)=>{
+    state.tenantId = tenantId
   }
 }
 
@@ -56,9 +62,11 @@ async function tenantQueryPage(id) {
       const tenantList = res.data?.rows || []
       tenantId = tenantList[0]?.id
     }
+    stateTenantId = tenantId
     if(tenantId) {
       const info = await tenantInfoInfo({id: tenantId})
       const data = info.data
+      stateTenantId = data.id
       sessionStorage.setItem('tenantConfig', JSON.stringify({
         themeColor: data.config.themeColor,
         theme: data.config.theme,
@@ -96,7 +104,6 @@ const actions = {
   },
   // get 获取用户信息
   getInfo ({ commit, state }) {
-
     return new Promise((resolve, reject) => {
       getInfo(state.token).then(async (response) => {
         if (response.code == 200) {
@@ -125,6 +132,7 @@ const actions = {
             const theme = tenantConfig.theme
             setTheme({ theme, themeColor })
           }
+          commit('SET_TENANTID', stateTenantId)
           sessionStorage.setItem('baseTenantId', tenantId)
           commit('SET_NAME', username)
           commit('SET_AVATAR', avatar)

+ 0 - 7
src/utils/searchArray.js

@@ -94,13 +94,6 @@ export const orderStatus = [
   { value: "OTHER", label: "其他" },
 ]
 
-// 机构交易类型
-export const tenantStatus = [
-  { value: "TENANT_OPEN", label: '机构开通缴费' },
-  { value: "TENANT_RENEW", label: '机构续费' },
-  { value: "CLOUD_TEACHER", label: '激活团练宝' }
-]
-
 // 交易状态
 export const dealStatus = [
   { value: "ING", label: "交易中" },

+ 4 - 4
src/views/accompaniment/index.vue

@@ -25,7 +25,7 @@
             placeholder="伴奏编号/伴奏名称"
           />
         </el-form-item>
-        <el-form-item prop="organId">
+        <!-- <el-form-item prop="organId">
           <el-select
             class="multiple"
             v-model.trim="searchForm.organId"
@@ -42,7 +42,7 @@
               :value="item.id"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item prop="type">
           <el-select
             v-model="searchForm.type"
@@ -143,7 +143,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           align="center"
           prop="organName"
           label="所属分部"
@@ -154,7 +154,7 @@
               <Tooltip :content="scope.row.organName" />
             </div>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column
           align="center"
           prop="subjectName"

+ 13 - 1
src/views/adapayAccount/form.vue

@@ -125,7 +125,7 @@
               证照文件
               <el-tooltip placement="top" popper-class="mTooltip">
                   <div slot="content">
-                    内容须包含三证合一证件照、法人身份证正面照、法人身份证反面照、开户银行许可证照。 压缩 zip包后上传。
+                    内容须包含三证合一证件照、法人身份证正面照、法人身份证反面照、开户银行许可证照。 压缩 zip包后上传。最大限制为 9 M。
                     <!-- 最大限制为 9 M。 -->
                   </div>
                   <i
@@ -146,7 +146,9 @@
                        :on-preview="handlePreview"
                        :on-remove="handleRemove"
                        :on-change="handleChange"
+                       :before-upload="beforeImgUpload"
                        :file-list="fileList"
+                       accept=".zip"
                        :multiple="false"
                        :limit="1"
                        :auto-upload="false">
@@ -315,6 +317,16 @@ export default {
         this.$refs["accountForm"].resetFields()
       }
     },
+    beforeImgUpload (file) {
+      const isLt2M = file.size / 1024 / 1024 < 9;
+      if (!isLt2M) {
+        this.$message.error(`上传文件大小不能超过 ${9}MB!`);
+      }
+      if (isSize) {
+        this.uploadImgLoading = true
+      }
+      return isSize;
+    },
     async onSubmit (formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {

+ 11 - 0
src/views/baseRulesClassSetting/index.vue

@@ -56,6 +56,14 @@
         >
           <vipCourseType v-if="activeIndex == '4'" />
         </el-tab-pane>
+        <el-tab-pane
+          label="课程收费设置"
+          lazy
+          name="8"
+          v-if="permissionList.vipChargeSeting"
+        >
+          <vipChargeSeting v-if="activeIndex == '8'" />
+        </el-tab-pane>
         <!-- <el-tab-pane
           label="网管课设置"
           lazy
@@ -75,6 +83,7 @@ import typesManager from "@/views/categroyManager//specialSetup/typesManager";
 import chargesList from "@/views/categroyManager/specialSetup/chargesList";
 import vipCourseType from "@/views/categroyManager/generalSettings/vipCourseType";
 import discountManage from "@/views/categroyManager/specialSetup/discountManage";
+import vipChargeSeting from "@/views/categroyManager/vipChargeSeting";
 import auditionSetting from "./audition";
 import { permission } from "@/utils/directivePage";
 export default {
@@ -86,6 +95,7 @@ export default {
     auditionSetting,
     typesManager,
     discountManage,
+    vipChargeSeting
   },
   name: "baseRulersManager",
   data() {
@@ -98,6 +108,7 @@ export default {
         vipCourseType: permission("/vipCourseType"),
         typesManager: permission("/globalConfig/typesManager"),
         discountManage:permission("/specialSetup/discountManage"),
+        vipChargeSeting:permission("/specialSetup/discountManage"),
       },
     };
   },

+ 4 - 4
src/views/categroyManager/vipChargeSeting.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="m-container">
-    <h2>
+  <div>
+    <!-- <h2>
       <div class="squrt"></div>课程收费设置
-    </h2>
-    <div class="m-core">
+    </h2> -->
+    <div>
       <save-form :inline="true"
                ref="searchForm"
                class="searchForm"

+ 12 - 0
src/views/productService/api.js

@@ -0,0 +1,12 @@
+import request2 from '@/utils/request2'
+
+export const recharge = (data) => request2({
+  url: `/api-web/tenantInfo/recharge/${data.amount}`,
+  method: 'get'
+})
+
+export const rechargeCheck = (data) => request2({
+  url: '/api-web/tenantInfo/rechargeCheck/' + data.orderNo,
+  method: 'get',
+  hideLoading: true,
+})

+ 96 - 0
src/views/productService/components/cloudRecharge.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="cloudRecharge">
+    <div class="tips">
+      <h2>云教室扣费规则</h2>
+      <div class="tips_container">
+        1.系统根据线上课课程人数(含老师)进行扣费;<br />
+        2.用户人数2人(含老师)每分钟0.2元;用户人数3人(含老师)每分钟0.5元;<br />
+        3.每节线上课平台赠送10分钟免费时,长分别为课前5分钟及课后5分钟,总送时长不计算费用;<br />
+        4.扣费金额按排课人数计算,无论实际到课人数是否为排课人数,都会按照排课人数扣费<br />
+        5.课程结束后费用立即结算。
+      </div>
+    </div>
+
+    <el-form label-position="top" ref="form" :model="form" label-width="80px">
+      <el-form-item label="充值金额"
+        prop="amount"
+        :rules="[{ required: true, message: '请输入充值金额', trigger: 'blur' },
+        { required: true, validator: validPrice, trigger: 'blur' }]">
+        <el-input v-model="form.amount" placeholder="请输入充值金额"
+          oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value"
+          type="number">
+          <div slot="append">元</div>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <div class="sure">
+      <el-button type="primary" @click="onRecharge">确认充值</el-button>
+    </div>
+
+    <el-dialog
+      title="服务订单"
+      :visible.sync="cloudVisible"
+      width="1000px"
+      v-if="cloudVisible"
+      append-to-body
+    >
+      <rechargeModel :amount="form.amount" @close="cloudVisible = false" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import rechargeModel from '@/views/productService/model/rechargeModel'
+export default {
+  name: 'cloudRecharge',
+  components: {
+    rechargeModel
+  },
+  data() {
+    return {
+      cloudVisible: false,
+      form: {
+        amount: null
+      }
+    }
+  },
+  methods: {
+    onRecharge() {
+      this.$refs.form.validate(async (_) => {
+        if(_) {
+          this.cloudVisible = true
+        }
+      })
+    },
+    validPrice (rule, value, callback) {
+      if ((value == "" && typeof value == "string") || value == null) {
+        callback(new Error("请输入金额"));
+      } else if (value <= 0) {
+        callback(new Error("输入金额必须大于0"));
+      } else if (value >= 100000) {
+        callback(new Error("输入金额必须小于100000"));
+      } else {
+        callback();
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.tips {
+  background: #f7f7f7;
+  padding: 15px;
+  h2 {
+    font-size: 18px;
+    line-height: 1.5;
+    height: auto;
+  }
+  .tips_container {
+    line-height: 1.5;
+  }
+}
+.el-input, .el-select {
+  width: 300px !important;
+}
+</style>

+ 0 - 0
src/views/productService/components/cloudTimes.vue


+ 0 - 0
src/views/productService/components/serviceRenew.vue


+ 68 - 0
src/views/productService/index.vue

@@ -0,0 +1,68 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>产品服务
+    </h2>
+    <div class="m-core">
+      <!-- navMenu    -->
+      <tab-router
+        v-model="activeIndex"
+        ref="tab"
+      >
+        <!-- <el-tab-pane
+          label="服务续费"
+          lazy
+          v-if="permission('/teamBaseInfo')"
+          name="1"
+        >
+        </el-tab-pane> -->
+        <el-tab-pane
+          label="云教室充值"
+          lazy
+          v-if="permission('/teamBaseInfo')"
+          name="2"
+        >
+          <cloud-recharge v-if="activeIndex == 2" />
+        </el-tab-pane>
+        <!-- <el-tab-pane
+          label="云教室时长包"
+          lazy
+          v-if="permission('/teamBaseInfo')"
+          name="1"
+        >
+        </el-tab-pane> -->
+      </tab-router>
+    </div>
+  </div>
+</template>
+<script>
+import cloudRecharge from '@/views/productService/components/cloudRecharge'
+import { permission } from "@/utils/directivePage";
+import { getTeamBaseInfo } from "@/api/buildTeam";
+import { musicGroupType } from "@/constant";
+//    forecastName,
+export default {
+  components: {
+    cloudRecharge,
+  },
+  name: "productService",
+  data() {
+    return {
+      activeIndex: "2",
+    };
+  },
+  mounted() {
+    this.__init();
+  },
+  methods: {
+    permission,
+    __init() {
+    },
+
+  }
+};
+</script>
+<style lang="scss" scoped>
+
+</style>
+

+ 84 - 0
src/views/productService/model/payment.vue

@@ -0,0 +1,84 @@
+<template>
+  <div class="chioseWrap">
+    <p>请在30分钟完成扫码支付</p>
+
+    <vue-qr :text="codeUrl" style="width: 250px" :margin="0"></vue-qr>
+  </div>
+</template>
+<script>
+import VueQr from 'vue-qr'
+import { rechargeCheck } from '../api'
+export default {
+  props: {
+    tableList: {
+      type: Array,
+      default: []
+    },
+    orderNo: {
+      type: String
+    },
+    codeUrl: {
+      type: String
+    },
+  },
+  components: { VueQr },
+  data() {
+    return {
+      payForm: {
+        payType: null,
+      },
+      selectStudentMoney: 0, // 选中学生金额
+      orderTimer: null
+    };
+  },
+  async mounted() {
+    let tableList = this.tableList || []
+    for(let i of tableList) {
+      this.selectStudentMoney += parseFloat(i.amount)
+    }
+    setTimeout(() => {
+      this.getPaymentStatus()
+    }, 3000)
+  },
+  methods: {
+    async getPaymentStatus() {
+      let orderTimer = setInterval(async () => {
+        this.orderTimer = orderTimer
+        try {
+          const res = await rechargeCheck({ orderNo: this.orderNo })
+          if(res.data) {
+            clearInterval(orderTimer)
+            this.$message.success('您已成功缴费')
+            this.$emit('close', true)
+          }
+        } catch(e) {
+          clearInterval(orderTimer)
+        }
+      }, 5000);
+    }
+  },
+  beforeDestroy() {
+    clearInterval(this.orderTimer)
+  }
+};
+</script>
+<style lang="less" scoped>
+.chioseWrap {
+  text-align: center;
+  font-size: 16px;
+  > p {
+    font-weight: 600;
+    padding-bottom: 15px;
+    line-height: 1.5;
+    span {
+      color: red;
+      padding: 0 3px;
+    }
+  }
+}
+.dialog-footer {
+  text-align: right;
+  display: block;
+  padding-top: 15px;
+}
+</style>

+ 146 - 0
src/views/productService/model/rechargeModel.vue

@@ -0,0 +1,146 @@
+<template>
+  <div class="chioseWrap">
+    <el-form :inline="true" ref="payForm" :model="payForm">
+      <el-form-item prop="payType" :rules="[{required: true, message: '请选择支付方式', trigger: 'change'}]">
+        <el-select
+          v-model.trim="payForm.payType"
+          style="width: 180px"
+          clearable
+          filterable
+          placeholder="请选择支付方式"
+        >
+          <el-option label="支付宝支付" value="alipay_qr"></el-option>
+          <el-option label="微信支付" value="wx_pub"></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column align="center" prop="name" label="产品名称">
+      </el-table-column>
+      <el-table-column
+        align="center"
+        label="充值金额(元)"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.rechargeAmount | hasMoneyFormat }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        label="支付价格(元)"
+      >
+        <template slot-scope="scope">
+          <span style="color: red;">{{ scope.row.amount | hasMoneyFormat }}</span>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="$listeners.close();">取 消</el-button>
+      <el-button @click="onMemberPay" type="primary">确 定</el-button>
+    </span>
+
+    <el-dialog
+      title="激活会员"
+      :visible.sync="payMentVisible"
+      :before-close="onClose"
+      v-if="payMentVisible"
+      width="500px"
+      append-to-body
+    >
+      <payment :tableList="tableList" :orderNo="orderNo" :codeUrl="codeUrl" @close="onPaymentClose" />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { recharge } from '../api'
+import { vaildStudentUrl } from '@/utils/validate'
+import payment from '@/views/productService/model/payment'
+export default {
+  props: ["amount"],
+  components: { payment },
+  data() {
+    return {
+      payForm: {
+        payType: null,
+      },
+      pay_channel: null, //支付渠道
+      selectStudentMoney: 0, // 选中学生金额
+      payMentVisible: false,
+      codeUrl: null,
+      orderNo: null,
+      tableList: []
+    };
+  },
+  async mounted() {
+    if(this.amount) {
+      this.tableList = [{
+        name: '云教室充值',
+        rechargeAmount: this.amount,
+        amount: this.amount
+      }]
+    }
+  },
+  methods: {
+    onMemberPay() {
+      this.$refs.payForm.validate(async (_) => {
+        if(_) {
+          try {
+            const res = await recharge({ amount: this.amount })
+            console.log(res)
+            const payForm = this.payForm
+            // // 二维码页面, 唤起支付页面
+            const { orderNo, sign, amount, orderBody, orderSubject } = res.data.payMap
+            this.orderNo = orderNo
+            this.codeUrl = vaildStudentUrl() + '/#/payCenter?orderNo=' + orderNo + '&sign=' + sign + '&amount=' + amount + '&payType=' + payForm.payType + '&orderBody=' + orderBody + '&orderSubject=' + orderSubject + '&platform=tenantRecharge'
+            console.log(this.codeUrl, 'codeUrl')
+            this.payMentVisible = true
+          } catch(e) {}
+        }
+      })
+    },
+    onClose(done) {
+      this.onPaymentClose(false, done)
+    },
+    onPaymentClose(hideTip = false, callBack) {
+      if(hideTip) {
+        this.payMentVisible = false
+        this.$emit('close')
+        return
+      }
+      this.$confirm(`是否支付完成?`, "提示", {
+        confirmButtonText: "已完成支付",
+        cancelButtonText: "未完成支付",
+        type: "warning",
+      }).then(async (res) => {
+        if(typeof callBack == 'function') {
+          callBack()
+        }
+        this.payMentVisible = false
+      });
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+.chioseWrap {
+  font-size: 16px;
+  > p {
+    font-weight: 500;
+    padding-bottom: 15px;
+    span {
+      color: red;
+      padding: 0 3px;
+    }
+  }
+}
+.dialog-footer {
+  text-align: right;
+  display: block;
+  padding-top: 15px;
+}
+</style>

+ 109 - 22
src/views/resetTeaming/components/payInfoDetail.vue

@@ -221,7 +221,9 @@
           <div v-if="!teamCourse && !member && !leBao && !teamActive">
             <empty desc="暂无缴费项目配置" />
           </div>
-          <div v-else class="submitBtn" @click="submitForm">确认提交</div>
+          <div v-else style="text-align:center;">
+            <el-button  class="submitBtn" @click="submitForm">确认提交</el-button>
+          </div>
         </div>
       </div>
     </div>
@@ -231,9 +233,25 @@
       width="400px"
       class="subjectPreview"
     >
-      <subject-preview
-        :preViewData="preViewData"
-      ></subject-preview>
+      <el-tabs v-model="activeName" type="card">
+        <el-tab-pane
+          :label="subject.subName"
+          lazy
+          v-for="(subject, index) in dialogSubjectList"
+          :key="index"
+          :name="subject.subjectId.toString()"
+          style="max-height: 500px;overflow-y: auto;"
+        >
+          <subject-preview
+            :subjectId="subject.subjectId"
+            :preViewData="preViewData"
+          ></subject-preview>
+        </el-tab-pane>
+      </el-tabs>
+
+      <div>
+        <el-button style="width: 100%; border-radius: 0; line-height: 30px" size="medium" type="primary" @click="onSubmit">提交</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -257,7 +275,7 @@ import {
   musicGroupcreateCalender,
   musicGroupresetCalender,
 } from "../api";
-import { getMusicGroupPaymentCalenderDetail } from "@/api/buildTeam";
+import { getMusicGroupPaymentCalenderDetail, findMusicGroupSubjectInfo } from "@/api/buildTeam";
 import { vipGroupActivity } from "@/api/vipSeting";
 export default {
   components: {
@@ -265,6 +283,7 @@ export default {
     payMember,
     payLeBao,
     payTeamActive,
+    subjectPreview
   },
   data() {
     return {
@@ -276,6 +295,7 @@ export default {
           {
             period: "",
             num: "",
+            name: "",
             actualAmount: "",
             memberRankSettingId: "",
             optionalFlag: null,
@@ -317,6 +337,8 @@ export default {
         maxYearFee: null,
       },
       dialogSubjectVisible: false, // 预览
+      dialogSubjectList: [],
+      activeName: null,
       preViewData: {}
     };
   },
@@ -608,12 +630,54 @@ export default {
       );
       // this.form.eclass = this.form.eclass.filter((item) => !!item);
     },
+    async onPreview() {
+      // 开始预览
+      const musicGroupId = this.$route.query.id;
+      await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.dialogSubjectList = res.data.musicGroupSubjectPlans;
+            // 默认预览第一个
+            this.activeName = this.dialogSubjectList[0].subjectId.toString();
+            this.dialogSubjectVisible = true;
+          } else {
+            this.$message.warning("没有可预览的声部");
+          }
+        }
+      );
+    },
     submitForm() {
       this.$refs.form.validate(async (isok) => {
         if (isok) {
-          // const preViewData = this.formatPreviewData()
-          // this.preViewData = preViewData
-          // this.dialogSubjectVisible = true
+          const preViewData = this.formatPreviewData()
+          this.preViewData = preViewData
+          await this.onPreview()
+          let obj = this.fommatDate();
+          console.log(preViewData, obj, 'open preview look at')
+          // if (this.$route.query.calenderId) {
+          //   obj.calenderId = this.$route.query.calenderId;
+          //   try {
+          //     const res = await musicGroupresetCalender(obj);
+          //     this.$message.success("修改缴费成功");
+          //     this.goback();
+          //   } catch (e) {
+          //     console.log(e);
+          //   }
+          // } else {
+          //   try {
+          //     const res = await musicGroupcreateCalender(obj);
+          //     this.$message.success("创建缴费成功");
+          //     this.goback();
+          //   } catch (e) {
+          //     console.log(e);
+          //   }
+          // }
+        }
+      });
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isok) => {
+        if (isok) {
           let obj = this.fommatDate();
           if (this.$route.query.calenderId) {
             obj.calenderId = this.$route.query.calenderId;
@@ -636,24 +700,41 @@ export default {
         }
       });
     },
-
     formatPreviewData() {
       // 格式化预览数据
       const form = this.form
       // 重置小班课数据
-      let activeList = form.activeList?.length > 0 ? form.activeList : []
-      if(activeList.length > 0) {
-        activeList.forEach(active => {
-          active.categoryName = active.vipGroupCategoryNames
+      let tmpActiveList = form.activeList?.length > 0 ? form.activeList : []
+      console.log(this.tmpActiveList, 'tmpActiveList')
+      let activeList = []
+      if(tmpActiveList.length > 0) {
+        tmpActiveList.forEach(active => {
+          if(active.activityId) {
+            active.categoryName = active.vipGroupCategoryNames
+            activeList.push(active)
+          }
         })
       }
+      let memberObj = form.memberList?.length > 0 ? { ...form.memberList[0] } : null
+      // 获取会员名称
+      if(memberObj) {
+        this.memberRankList.forEach(item => {
+          if(item.id == memberObj.memberRankSettingId) {
+            memberObj.name = item.name
+          }
+        })
+      }
+      console.log(memberObj, 'memberObj', activeList)
+
       return {
         musicGroup: this.musicGroup,
-        activity: [...activeList], // 小班课
-        course: form.eclass?.length > 0 ? form.eclass : [], // 课程
-        member: form.memberList?.length > 0 ? { ...form.memberList[0] } : null, // 团练宝
-        memberPrivilegesItemList: [], // 会员基本内容
-        repair: form.leBaoList?.length > 0 ? { ...form.leBaoList[0] } : null, // 乐保
+        paymentCalender: {
+          activity: [...activeList], // 小班课
+          course: form.eclass?.length > 0 ? form.eclass : [], // 课程
+          member: memberObj, // 团练宝
+          memberPrivilegesItemList: [], // 会员基本内容
+          repair: form.leBaoList?.length > 0 ? { ...form.leBaoList[0], optionalFlag: false } : null, // 乐保
+        }
       }
     },
     fommatDate() {
@@ -760,12 +841,12 @@ export default {
 }
 .payInfoWrap {
   .submitBtn {
-    width: 121px;
-    height: 41px;
+    // width: 121px;
+    // height: 41px;
     background: var(--color-primary);
     border-radius: 7px;
-    margin: 20px auto;
-    line-height: 40px;
+    // margin: 20px auto;
+    // line-height: 40px;
     color: #fff;
     text-align: center;
     cursor: pointer;
@@ -878,3 +959,9 @@ export default {
   }
 }
 </style>
+<style lang="less" scoped>
+/deep/.el-dialog__body {
+  padding: 15px 0 0;
+}
+</style>
+

+ 1 - 0
src/views/resetTeaming/components/resetPayList.vue

@@ -497,6 +497,7 @@
           v-for="(subject, index) in dialogSubjectList"
           :key="index"
           :name="subject.subjectId.toString()"
+          style="max-height: 500px;overflow-y: auto;"
         >
           <subject-preview
             :subjectId="subject.subjectId"

+ 2 - 2
src/views/resetTeaming/modals/courseModel.vue

@@ -47,7 +47,7 @@
               class="check_default"
               :class="[
                 item.isStatus ? 'check_active' : '',
-                !item.isStudentOptional ? 'disabled' : ''
+                item.isStudentOptional ? 'disabled' : ''
               ]"
             ></i
             ><template v-if="item.courseType == 'PROJECT'">{{
@@ -83,7 +83,7 @@
               class="check_default"
               :class="[
                 item.isStatus ? 'check_active' : '',
-                !item.isStudentOptional ? 'disabled' : ''
+                item.isStudentOptional ? 'disabled' : ''
               ]"
             ></i>
             <span style="display: flex; align-items: center;">

+ 1 - 2
src/views/resetTeaming/modals/instrumentModel.vue

@@ -162,8 +162,7 @@ export default {
     //     this.$emit('onLeBao')
     // },
     instrumentF(item) {
-      console.log(item);
-      this.$emit("instrumentF", item);
+      this.$emit("instrumentF", item, 'INSTRUMENT');
     },
     onQuestions(item) {
       this.$emit("onQuestions", item);

+ 18 - 0
src/views/resetTeaming/modals/signUpPayment.less

@@ -125,6 +125,24 @@
   }
 }
 
+.check_default.noSelect {
+  // opacity: 0.5;
+  // .check_active {
+  //     opacity: 0.5;
+  // }
+  &::before {
+      background: url("../../../assets/images/icon_checkbox_default_disabled.png") no-repeat center;
+      background-size: contain;
+      border-radius: 50%;
+  }
+
+  .check_active {
+      background: url("../../../assets/images/icon_checkbox_default_disabled.png") no-repeat center;
+      background-size: contain;
+      border-radius: 50%;
+  }
+}
+
 .buy {
   height: 60px;
   display: flex;

+ 216 - 177
src/views/resetTeaming/modals/subject-preview.vue

@@ -48,7 +48,7 @@
 				</el-row>
 				<el-row class="option-row" v-for="(item, index) in instrumentRepair" :key="index" @click.native="onCheckItem(item)">
 					<el-col :span="12">
-						<i class="check_default" :class="[item.isStatus ? 'check_active' : '', !item.optionalFlag ? 'disabled' : '']"></i>
+						<i class="check_default" :class="[item.isStatus ? 'check_active' : '', item.optionalFlag ? 'disabled' : '', item.noSelect ? 'noSelect' : '']"></i>
             {{ item.name }}
 					</el-col>
 					<el-col :span="6">
@@ -75,7 +75,7 @@
     />
 
 
-    <div class="buy">
+    <!-- <div class="buy">
       <div class="price">
         <p class="oldprice">
           <del class="text">原价</del>
@@ -90,7 +90,7 @@
       </div>
 
       <a class="btn-submit">购买</a>
-    </div>
+    </div> -->
   </div>
 </template>
 <script>
@@ -184,165 +184,134 @@ export default {
         subjectId: this.subjectId,
         calenderId: this.calenderId,
       };
-      await getType().then((res) => {
-        let result = res.data;
-        if (res.code == 200) {
-          this.chargeTypeList = result.rows || [];
-        }
-      });
+      // await getType().then((res) => {
+      //   let result = res.data;
+      //   if (res.code == 200) {
+      //     this.chargeTypeList = result.rows || [];
+      //   }
+      // });
       await getSubjectGoodsAndInfoPreview(params).then((res) => {
         let result = res;
         if (result.code == 200) {
           let tempResult = result.data;
-          this.courseViewType = tempResult.musicGroup.courseViewType || 0;
-          this.organId = tempResult.musicGroup.organId;
-          this.cloudTeacherFee = tempResult.cloudTeacherFee || 0;
-          this.cloudTeacherPlusFee = tempResult.cloudTeacherPlusFee || 0;
+          this.__dataFormat(tempResult)
+        }
+        // 初始化计算金额
+        this.calcPrice();
+      });
+    },
+    __dataFormat(tempResult) {
+      console.log(this.preViewData, 'sffwef')
+      console.log(tempResult, 'tempResult')
+      this.courseViewType = tempResult.musicGroup.courseViewType || 0;
+      this.organId = tempResult.musicGroup.organId;
+      this.cloudTeacherFee = tempResult.cloudTeacherFee || 0;
+      this.cloudTeacherPlusFee = tempResult.cloudTeacherPlusFee || 0;
 
-          let memberCoursePrice = tempResult.memberCoursePrice || {};
-          for (let i in memberCoursePrice) {
-            this.memberCoursePrice.push({
-              name: coursesType[i],
-              price: memberCoursePrice[i],
-            });
-          }
-          this.memberCourseShowFlag =
-            tempResult.musicGroup.memberCourseShowFlag || false;
+      let memberCoursePrice = tempResult.memberCoursePrice || {};
+      for (let i in memberCoursePrice) {
+        this.memberCoursePrice.push({
+          name: coursesType[i],
+          price: memberCoursePrice[i],
+        });
+      }
+      this.memberCourseShowFlag =
+        tempResult.musicGroup.memberCourseShowFlag || false;
 
-          this.paymentPattern = 2;
-          if (tempResult.musicGroupPaymentCalender) {
-            this.paymentPattern =
-              tempResult.musicGroupPaymentCalender.paymentPattern;
-            this.serviceValidDate =
-              dayjs(
-                tempResult.musicGroupPaymentCalender.paymentValidStartDate
-              ).format("YYYY/MM/DD") +
-              "~" +
-              dayjs(
-                tempResult.musicGroupPaymentCalender.paymentValidEndDate
-              ).format("YYYY/MM/DD");
-          }
-          const paymentCalender = tempResult.paymentCalender || null
-          let tempInfo = paymentCalender && paymentCalender.course ? paymentCalender.course : [];
+      this.paymentPattern = 2;
+      if (tempResult.musicGroupPaymentCalender) {
+        this.paymentPattern =
+          tempResult.musicGroupPaymentCalender.paymentPattern;
+        this.serviceValidDate =
+          dayjs(
+            tempResult.musicGroupPaymentCalender.paymentValidStartDate
+          ).format("YYYY/MM/DD") +
+          "~" +
+          dayjs(
+            tempResult.musicGroupPaymentCalender.paymentValidEndDate
+          ).format("YYYY/MM/DD");
+      }
+      const paymentCalender =  this.preViewData ? this.preViewData.paymentCalender : (tempResult.paymentCalender || null)
+      console.log(paymentCalender, 'paymentCalender')
+      let tempInfo = paymentCalender && paymentCalender.course ? paymentCalender.course : [];
 
 
-          let memberPrivilegesItemList = tempResult.memberPrivilegesItemList
-            ? tempResult.memberPrivilegesItemList
-            : [];
-          let tempMember = [];
-          memberPrivilegesItemList.forEach((member) => {
-            if (
-              member.memberPrivilegesItems &&
-              member.memberPrivilegesItems.length > 0
-            ) {
-              member.memberPrivilegesItems.forEach((item) => {
-                tempMember.push(item.name);
-              });
-            }
+      let memberPrivilegesItemList = tempResult.memberPrivilegesItemList
+        ? tempResult.memberPrivilegesItemList
+        : [];
+      let tempMember = [];
+      memberPrivilegesItemList.forEach((member) => {
+        if (
+          member.memberPrivilegesItems &&
+          member.memberPrivilegesItems.length > 0
+        ) {
+          member.memberPrivilegesItems.forEach((item) => {
+            tempMember.push(item.name);
           });
-          // 团练宝
-          const member = paymentCalender && paymentCalender.member ? paymentCalender.member : {}
-          member.isStatus = member.optionalFlag ? true : false
-          this.toolsPackage = [member]
-          // 乐器保养
-          const repair = paymentCalender && paymentCalender.repair ? paymentCalender.repair : {}
-          repair.name = '乐器保养'
-          repair.isStatus = repair.optionalFlag ? true : false // 默认不选择乐器保养
-          this.instrumentRepair = [repair]
-          // 小班课
-          const activity = paymentCalender && paymentCalender.activity ? paymentCalender.activity : []
-          activity.map(i => {
-            if(i.optionalFlag) {
-              i.isStatus = true
-            } else {
-              i.isStatus = false
-            }
-          })
-          this.activityList = [...activity]
+        }
+      });
+      // 团练宝
+      const member = paymentCalender && paymentCalender.member ? paymentCalender.member : {}
+      member.isStatus = member.optionalFlag ? true : false
+      this.toolsPackage = [member]
+      // 乐器保养
+      const repair = paymentCalender && paymentCalender.repair ? paymentCalender.repair : {}
+      repair.name = '乐器保养'
+      repair.isStatus = repair.optionalFlag ? true : false // 默认不选择乐器保养
+      this.instrumentRepair = [repair]
+      // 小班课
+      const activity = paymentCalender && paymentCalender.activity ? paymentCalender.activity : []
+      activity.map(i => {
+        if(i.optionalFlag) {
+          i.isStatus = true
+        } else {
+          i.isStatus = false
+        }
+      })
+      this.activityList = [...activity]
 
-          // 判断是否有课程
-          if (tempInfo && tempInfo.length > 0) {
+      // 判断是否有课程
+      if (tempInfo && tempInfo.length > 0) {
 
-            // 默认课程都选中
-            tempInfo.forEach((item) => {
-              if (item && item.isStudentOptional) {
-                item.isStatus = false;
-              } else {
-                item.isStatus = true;
-              }
-            });
-            this.courseInfo = tempInfo;
-          }
+        // 默认课程都选中
+        tempInfo.forEach((item) => {
+          // if (item && item.isStudentOptional) {
+            // item.isStatus = false;
+          // } else {
+            item.isStatus = true;
+          // }
+        });
+        this.courseInfo = tempInfo;
+      }
 
-          this.musicGroupSubject = tempResult.musicGroupSubjectPlan;
-          let instrumentInfo = {};
-          let tempInstrument = [];
-          tempResult.musicGroupSubjectGoodsGroupList.forEach((item) => {
-            if (item.type == "INSTRUMENT") {
-              // 获取乐器所有提供方式
-              let KGPTJ = item.kitGroupPurchaseTypeJson
-                ? JSON.parse(item.kitGroupPurchaseTypeJson)
-                : {};
-              for (let single in KGPTJ) {
-                let tempItem = Object.assign({}, item); // 深拷贝
-                tempItem.marketPrice = tempItem.goodsList[0].marketPrice;
-                tempItem.kitType = single; // 优惠模式
-                tempItem.coupon = KGPTJ[single]; // 优惠金额
-                tempItem.discountPrice = tempItem.goodsList[0].discountPrice
-                if (instrumentInfo.id) {
-                  tempItem.isStatus = false;
-                  if (single == "GROUP") {
-                    // 团购
-                    if (
-                      (instrumentInfo.kitType == "GROUP" &&
-                        instrumentInfo.price < tempItem.price) ||
-                      instrumentInfo.kitType == "LEASE" ||
-                      instrumentInfo.kitType == "FREE"
-                    ) {
-                      this.instrumentResult.forEach((instrRes) => {
-                        instrRes.isStatus = false;
-                      });
-                      tempItem.isStatus = true;
-                      instrumentInfo = {
-                        id: tempItem.id,
-                        price: tempItem.price,
-                        kitType: single,
-                      };
-                    }
-                  } else if (single == "LEASE") {
-                    // 租赁
-                    if (
-                      instrumentInfo.kitType == "LEASE" &&
-                      instrumentInfo.price < tempItem.price
-                    ) {
-                      this.instrumentResult.forEach((instrRes) => {
-                        instrRes.isStatus = false;
-                      });
-                      tempItem.isStatus = true;
-                      instrumentInfo = {
-                        id: tempItem.id,
-                        price: tempItem.price,
-                        kitType: single,
-                      };
-                    }
-                  } else if (single == "FREE") {
-                    // 免费
-                    if (
-                      instrumentInfo.kitType == "FREE" &&
-                      instrumentInfo.price < tempItem.price
-                    ) {
-                      this.instrumentResult.forEach((instrRes) => {
-                        instrRes.isStatus = false;
-                      });
-                      tempItem.isStatus = true;
-                      instrumentInfo = {
-                        id: tempItem.id,
-                        price: tempItem.price,
-                        kitType: single,
-                      };
-                    }
-                  }
-                } else {
+      this.musicGroupSubject = tempResult.musicGroupSubjectPlan || [];
+      let instrumentInfo = {};
+      let tempInstrument = [];
+      tempResult.musicGroupSubjectGoodsGroupList?.forEach((item) => {
+        if (item.type == "INSTRUMENT") {
+          // 获取乐器所有提供方式
+          let KGPTJ = item.kitGroupPurchaseTypeJson
+            ? JSON.parse(item.kitGroupPurchaseTypeJson)
+            : {};
+          for (let single in KGPTJ) {
+            let tempItem = Object.assign({}, item); // 深拷贝
+            tempItem.marketPrice = tempItem.goodsList[0].marketPrice;
+            tempItem.kitType = single; // 优惠模式
+            tempItem.coupon = KGPTJ[single]; // 优惠金额
+            tempItem.discountPrice = tempItem.goodsList[0].discountPrice
+            if (instrumentInfo.id) {
+              tempItem.isStatus = false;
+              if (single == "GROUP") {
+                // 团购
+                if (
+                  (instrumentInfo.kitType == "GROUP" &&
+                    instrumentInfo.price < tempItem.price) ||
+                  instrumentInfo.kitType == "LEASE" ||
+                  instrumentInfo.kitType == "FREE"
+                ) {
+                  this.instrumentResult.forEach((instrRes) => {
+                    instrRes.isStatus = false;
+                  });
                   tempItem.isStatus = true;
                   instrumentInfo = {
                     id: tempItem.id,
@@ -350,41 +319,79 @@ export default {
                     kitType: single,
                   };
                 }
-                let childGoodsNameList = [];
+              } else if (single == "LEASE") {
+                // 租赁
                 if (
-                  tempItem.childGoodsList &&
-                  tempItem.childGoodsList.length > 0
+                  instrumentInfo.kitType == "LEASE" &&
+                  instrumentInfo.price < tempItem.price
                 ) {
-                  tempItem.childGoodsList.forEach((child) => {
-                    if (child.type != "INSTRUMENT" && child.type != "OTHER") {
-                      childGoodsNameList.push(child.name);
-                    }
+                  this.instrumentResult.forEach((instrRes) => {
+                    instrRes.isStatus = false;
                   });
-
-                  tempItem.childGoodsNames = childGoodsNameList.join("、");
+                  tempItem.isStatus = true;
+                  instrumentInfo = {
+                    id: tempItem.id,
+                    price: tempItem.price,
+                    kitType: single,
+                  };
+                }
+              } else if (single == "FREE") {
+                // 免费
+                if (
+                  instrumentInfo.kitType == "FREE" &&
+                  instrumentInfo.price < tempItem.price
+                ) {
+                  this.instrumentResult.forEach((instrRes) => {
+                    instrRes.isStatus = false;
+                  });
+                  tempItem.isStatus = true;
+                  instrumentInfo = {
+                    id: tempItem.id,
+                    price: tempItem.price,
+                    kitType: single,
+                  };
                 }
-                this.instrumentResult.push(tempItem);
-                tempInstrument.push(tempItem);
               }
-            } else if (item.type == "ACCESSORIES") {
-              item.isStatus = true;
-              this.accessOries.push(item);
+            } else {
+              tempItem.isStatus = true;
+              instrumentInfo = {
+                id: tempItem.id,
+                price: tempItem.price,
+                kitType: single,
+              };
             }
-          });
-          // 添加自备选项
-          if (this.instrumentResult.length > 0) {
-            let sorted = this.groupBy(tempInstrument, (item) => {
-              return [item.kitType];
-            });
-            this.instrumentResultList = sorted;
+            let childGoodsNameList = [];
+            if (
+              tempItem.childGoodsList &&
+              tempItem.childGoodsList.length > 0
+            ) {
+              tempItem.childGoodsList.forEach((child) => {
+                if (child.type != "INSTRUMENT" && child.type != "OTHER") {
+                  childGoodsNameList.push(child.name);
+                }
+              });
+
+              tempItem.childGoodsNames = childGoodsNameList.join("、");
+            }
+            this.instrumentResult.push(tempItem);
+            tempInstrument.push(tempItem);
           }
+        } else if (item.type == "ACCESSORIES") {
+          item.isStatus = true;
+          this.accessOries.push(item);
         }
-        // 初始化计算金额
-        this.calcPrice();
       });
-    },
-    onLeBao() {
-      this.buyMaintenance = !this.buyMaintenance;
+      // 添加自备选项
+      if (this.instrumentResult.length > 0) {
+        let sorted = this.groupBy(tempInstrument, (item) => {
+          return [item.kitType];
+        });
+        this.instrumentResultList = sorted;
+
+        this.setLeBaoStatus()
+      }
+
+      // 初始化计算金额
       this.calcPrice();
     },
     groupBy(array, f) {
@@ -421,13 +428,45 @@ export default {
         );
       }
     },
-    onCheckItem(item) {
+    onCheckItem(item,type) {
       // 默认选中不可改
       if(item.optionalFlag) return
+      // 判断乐保是否可选
+      if(item.noSelect) return
+      // 如果选择的是乐器先把所有选中的取消
+      if(type == 'INSTRUMENT') {
+        this.instrumentResultList.forEach(group => {
+          group.forEach(child => {
+            if(child.id != item.id) {
+              child.isStatus = false
+            }
+          })
+        })
+      }
       item.isStatus = !item.isStatus;
+      // 重新设置乐保状态
+      this.setLeBaoStatus()
       // 重新计算金额
       this.calcPrice();
     },
+    setLeBaoStatus() { // 设置乐保状态
+      let status = false // 是否有选中乐器
+      this.instrumentResultList.forEach(group => {
+        group.forEach(item => {
+          if(item.isStatus) {
+            status = true
+          }
+        })
+      })
+      this.instrumentRepair.forEach(repair => {
+        if(status) {
+          repair.noSelect = false
+        } else {
+          repair.noSelect = true
+          repair.isStatus = false
+        }
+      })
+    },
     calcPrice() {
       let ids = []
       let amount = 0,

+ 5 - 4
src/views/teamBuild/initiationList.vue

@@ -298,17 +298,18 @@ export default {
   props: ["isedit"],
   data() {
     const query = this.$route.query;
+    let tenantConfig = sessionStorage.getItem('tenantConfig')
+    tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {}
+    const tenantId = tenantConfig.tenantId || 0
     return {
       codedetailStatus: false,
       teamName: query.name || null,
       codeStatus: false,
       musicGroupId: query.id,
       codeUrl:
-        vaildStudentUrl() +
-        "/project/forecastName/initiation.html?musicGroupId=" +
-        query.id,
+        vaildStudentUrl() + "/project/forecastName/initiation.html?musicGroupId=" + query.id + '&tenantId=' + tenantId,
       detailUrl:
-        vaildTeachingUrl() + "/#/preApplySubject?musicGroupId=" + query.id,
+        vaildTeachingUrl() + "/#/preApplySubject?musicGroupId=" + query.id + '&tenantId=' + tenantId,
       searchForm: {
         search: null,
         currentGradeNum: null,

+ 1 - 2
src/views/tenantSetting/groupRecordManager.vue

@@ -102,7 +102,7 @@
 <script>
 import pagination from "@/components/Pagination/index";
 import { queryActiveRecord } from "./api";
-import { tenantStatus, dealStatus } from "@/utils/searchArray";
+import { dealStatus } from "@/utils/searchArray";
 import { getTimes } from "@/utils";
 const initSearch = {
   queryCondition: null,
@@ -113,7 +113,6 @@ export default {
   components: { pagination },
   data() {
     return {
-      tenantStatus,
       dealStatus,
       tableList: [],
       pageInfo: {

+ 5 - 4
src/views/tenantSetting/tenantTradeManager.vue

@@ -51,10 +51,10 @@
           placeholder="交易类型"
         >
           <el-option
-            v-for="(item, index) in tenantStatus"
+            v-for="(item, key, index) in tenantStatus"
             :key="index"
-            :label="item.label"
-            :value="item.value"
+            :label="item"
+            :value="key"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -155,7 +155,8 @@
 import pagination from "@/components/Pagination/index";
 import { tenantInfoQueryPage } from "../organManager/api";
 import { tenantOrderRecordQueryPage } from "./api";
-import { tenantStatus, dealStatus } from "@/utils/searchArray";
+import { tenantStatus } from '@/constant'
+import { dealStatus } from "@/utils/searchArray";
 import OrderInfo from './model/orderInfo'
 import { getTimes } from "@/utils";
 const initSearch = {