Sfoglia il codice sorgente

Merge branch '10/23-test' of http://git.dayaedu.com/molingzhide/dy-admin-manager into 10/23-test

王新雷 4 anni fa
parent
commit
afdce75449

+ 29 - 1
src/api/auditManager.js

@@ -9,4 +9,32 @@ export function getAuditList(data) {
       method: 'get',
       params: data
     })
-  }
+}
+
+// 查看缴费详情
+export function getAuditListDetail(data) {
+    return request({
+      url: api + '/musicGroupPaymentCalender/auditListDetail',
+      method: 'get',
+      params: data
+    })
+}
+
+// 审核通过
+
+export function auditPass(data) {
+    return request({
+      url: api + '/musicGroupPaymentCalender/auditPass',
+      method: 'post',
+     data:qs.stringify(data)
+    })
+}
+
+// 驳回
+export function auditRefuse(data) {
+    return request({
+      url: api + '/musicGroupPaymentCalender/auditRefuse',
+      method: 'post',
+     data:qs.stringify(data)
+    })
+}

+ 12 - 1
src/api/buildTeam.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import request2 from '@/utils/request2'
 import qs from 'qs'
 let api = '/api-web'
 // 获取分部
@@ -805,6 +806,16 @@ export function getHoliday (data) {
   })
 }
 
+// 获取指定学员在指定乐团下本次课排课时长
+export function getMusicCourseSettingsWithStudents (data) {
+  return request2({
+    url: api + `/musicGroupPaymentCalender/getMusicCourseSettingsWithStudents`,
+    method: 'GET',
+    params: data,
+    data: {},
+  })
+}
+
 // 获取乐团(声部)的(没有某种班级类型)学生
 export function getMusicGroupStuNoClassType (data) {
   return request({
@@ -1348,4 +1359,4 @@ export function getSubjectGoods (data) {
     method: 'get',
     params: data
   })
-}
+}

+ 3 - 1
src/components/Descriptions/Descriptions.vue

@@ -60,11 +60,13 @@ export default {
   mounted() {
     this.generateChildrenRow(this.$slots.default || [])
   },
+  beforeUpdate() {
+    this.generateChildrenRow(this.$slots.default || [])
+  },
   methods: {
     // 获取描述内容子项
     generateChildrenRow(dataSource) {
       const dataList = dataSource.filter(item => item.tag === 'descriptions-item')
-      console.log(dataList)
       this.rows = []
       let leftSpan = this.column
       let children = []

+ 24 - 2
src/constant/index.js

@@ -57,7 +57,7 @@ export const genderType = {
 
 export const paymentPatternType = {
   0: '按月',
-  1: '按',
+  1: '按学期',
   2: '一次性',
 }
 
@@ -71,8 +71,23 @@ export const paymentType = {
   1: '报名',
 }
 
+export const userPaymentType = {
+  ADD_STUDEN: '新增学员',
+  ADD_COURSE: '临时加课',
+  MUSIC_APPLY: '乐团报名',
+  MUSIC_RENEW: '乐团续费',
+}
+
+export const payStatus = {
+  AUDITING: '审核中',
+  REJECT: '拒绝',
+  NO: '未开启缴费',
+  OPEN: '开启缴费',
+  OVER: '缴费已结束',
+}
+
 export const payOrderType = {
-  STUDENT:'学生',
+  STUDENT:'个人',
   SCHOOL:'学校' 
 }
 
@@ -83,3 +98,10 @@ export const auditType = {
   OPEN:'开启缴费',
   OVER:'缴费已结束'
 }
+
+export const auditPaymentType = {
+  ADD_STUDENT:'新增学员',
+  ADD_COURSE:'临时加课',
+  MUSIC_APPLY:'乐团报名',
+  MUSIC_RENEW:'乐团续费'
+}

+ 3 - 3
src/utils/searchArray.js

@@ -1,5 +1,5 @@
 // 搜索用的下拉数据列表
-import { payOrderType } from '../constant'
+import { payOrderType,auditType,auditPaymentType } from '../constant'
 // 课程类型
 export const courseType = [
   { label: "单技课", value: "SINGLE" },
@@ -209,8 +209,8 @@ export const classTimeList = [
 ]
 
 export const payOrderTypeList = getValueForKey(payOrderType)
-  
-
+export const auditTypeList = getValueForKey(auditType)
+export const auditPaymentTypeList = getValueForKey(auditPaymentType)
 
 function getValueForKey(obj){
   let arr = []

+ 26 - 2
src/utils/vueFilter.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import dayjs from 'dayjs'
 import numeral from 'numeral'
-import { feeProject, feeType, saleType,payOrderType } from '../constant'
+import { feeProject, feeType, saleType, payStatus, payOrderType, paymentPatternType, payUserType, userPaymentType, courseType,auditType,auditPaymentType } from '../constant'
 
 // 合并数组
 Vue.filter('joinArray', (value, type) => {
@@ -162,6 +162,15 @@ Vue.filter('dateForMinFormat', (value) => {
   }
 })
 
+Vue.filter('paymentPatternTypeFormat', val => paymentPatternType[val])
+// 支付用户类型
+Vue.filter('payUserTypeFormat', val => payUserType[val])
+// 支付缴费方式
+Vue.filter('userPaymentTypeFormat', val => userPaymentType[val])
+// 课程类型格式化
+Vue.filter('courseTypeFormat', val => courseType[val])
+
+
 // 时间处理
 Vue.filter('timer', (value) => {
   if (value) {
@@ -282,6 +291,11 @@ Vue.filter('returnStatus', value => {
   return template[value]
 })
 
+// 缴费状态
+Vue.filter('payTypeStatus', val => {
+  return payStatus[val]
+})
+
 // 性别
 Vue.filter('sex', value => {
   let template = ['女', '男']
@@ -654,7 +668,17 @@ Vue.filter('receiveFormat', value => {
 })
 
 // 缴费方式
-payOrderType
+
 Vue.filter('payOrderType', value => {
   return payOrderType[value]
 })
+
+// 审核状态 auditType
+Vue.filter('auditType', value => {
+  return auditType[value]
+})
+
+// 审核申请类型 auditPaymentType
+Vue.filter('auditPaymentType', value => {
+  return auditPaymentType[value]
+})

+ 116 - 235
src/views/auditList/index.vue

@@ -34,32 +34,32 @@
         <el-form-item>
           <el-select
             class="multiple"
-            v-model.trim="searchForm.organId"
+            v-model.trim="searchForm.paymentType"
             filterable
             clearable
             placeholder="申请类型"
           >
             <el-option
-              v-for="(item, index) in organList"
+              v-for="(item, index) in paymentTypeList"
               :key="index"
-              :label="item.name"
-              :value="item.id"
+              :label="item.label"
+              :value="item.value"
             ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
           <el-select
             class="multiple"
-            v-model.trim="searchForm.organId"
+            v-model.trim="searchForm.status"
             filterable
             clearable
             placeholder="审核状态"
           >
             <el-option
-              v-for="(item, index) in organList"
+              v-for="(item, index) in statusList"
               :key="index"
-              :label="item.name"
-              :value="item.id"
+              :label="item.label"
+              :value="item.value"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -71,10 +71,9 @@
         <el-table
           :data="tableList"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
-          >
+        >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column
-            width="120px"
             align="center"
             prop="organName"
             label="分部名称"
@@ -86,67 +85,98 @@
           ></el-table-column>
           <el-table-column
             align="center"
+            width="180px"
             prop="musicGroupId"
             label="乐团编号"
           ></el-table-column>
+          <el-table-column align="center" prop="paymentType" label="申请类型">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.paymentType | auditPaymentType }}
+              </div>
+            </template></el-table-column
+          >
+          <el-table-column align="center" prop="payUserType" label="订单类型">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.payUserType | payOrderType }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
-            prop="paymentType"
-            label="申请类型"
-          ></el-table-column>
-           <el-table-column
-            align="center"
-            prop="payUserType"
-            label="订单类型"
-          ></el-table-column>
-           <el-table-column
-            align="center"
             prop="addCourseTotalTime"
             label="加课总时长(分钟)"
           ></el-table-column>
-           <el-table-column
+          <el-table-column
             align="center"
             prop="courseOriginalPrice"
-            label="原现价(分钟)"
-          ></el-table-column>
-             <el-table-column
+            label="原现价(元)"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.courseOriginalPrice | moneyFormat }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
             align="center"
             prop="courseCurrentPrice"
-            label="申请价格(分钟)"
-          ></el-table-column>
-           <el-table-column
-            align="center"
-            prop="memo"
-            label="备注"
-          ></el-table-column>
-           <el-table-column
+            label="申请价格(元)"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.courseCurrentPrice | moneyFormat }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="memo" label="备注">
+            <template slot-scope="scope">
+              <tooltip :content="scope.row.memo" />
+            </template>
+          </el-table-column>
+          <el-table-column
             align="center"
             prop="operatorName"
             label="申请人"
           ></el-table-column>
-            <el-table-column
+          <el-table-column
             align="center"
             prop="auditStatus"
             label="状态"
-          ></el-table-column>
-               <el-table-column
+            width="100px"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.auditStatus | auditType }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
             align="center"
             prop="createTime"
             label="申请时间"
-          ></el-table-column>
-          <el-table-column align="center" label="操作">
+            width="140px"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.createTime | dateForMinFormat }}
+              </div>
+            </template></el-table-column
+          >
+          <!--  -->
+          <el-table-column
+            align="center"
+            label="操作"
+            width="100px"
+            fixed="right"
+          >
             <template slot-scope="scope">
               <el-button
                 v-permission="'helpCenterContent/modify'"
-                @click="openTypes('update', scope.row)"
-                type="text"
-                >修改</el-button
-              >
-              <el-button
-                @click="onTypeDelOpeation(scope.row)"
-                v-permission="'helpCenterContent/delete'"
+                @click="lookDetail(scope.row)"
                 type="text"
-                >删除</el-button
+                >查看</el-button
               >
             </template>
           </el-table-column>
@@ -160,89 +190,36 @@
         />
       </div>
     </div>
-    <el-dialog
-      :title="formTitle[formActionTitle]"
-      :visible.sync="typeStatus"
-      @close="onFormClose('ruleForm')"
-      width="500px"
-    >
-      <el-form :model="form" :rules="rules" ref="ruleForm">
-        <el-form-item label="标题" prop="title" :label-width="formLabelWidth">
-          <el-input
-            v-model.trim="form.title"
-            autocomplete="off"
-            placeholder="请输入标题"
-          ></el-input>
-        </el-form-item>
-        <el-form-item
-          label="分类"
-          prop="catalogId"
-          :label-width="formLabelWidth"
-        >
-          <el-cascader
-            v-if="typeStatus"
-            style="width: 100%"
-            :show-all-levels="false"
-            ref="formCascader"
-            :options="treeList"
-            v-model="form.catalogId"
-            :props="{ checkStrictly: true }"
-            clearable
-          ></el-cascader>
-        </el-form-item>
-        <el-form-item label="内容" prop="content" :label-width="formLabelWidth">
-          <el-input
-            type="textarea"
-            :rows="3"
-            placeholder="请输入内容"
-            v-model="form.content"
-          >
-          </el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="typeStatus = false">取 消</el-button>
-        <el-button type="primary" @click="onTypeSubmit('ruleForm')"
-          >确 定</el-button
-        >
-      </span>
+    <el-dialog title="申请详情" width="900px" :visible.sync="typeStatus" destroy-on-close>
+      <review :detail="detail" @close="close" />
     </el-dialog>
   </div>
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
+import review from "@/views/resetTeaming/modals/review.vue";
 // import store from '@/store'
-import {
- getAuditList
-} from "@/api/auditManager";
+import { getAuditList, getAuditListDetail } from "@/api/auditManager";
+import { getEmployeeOrgan } from "@/api/buildTeam";
+import Tooltip from "@/components/Tooltip/index";
+import { auditTypeList, auditPaymentTypeList } from "@/utils/searchArray";
+
 export default {
-  components: { pagination },
+  components: { pagination, Tooltip, review },
   name: "helpCategory",
   data() {
     return {
+      paymentTypeList: auditPaymentTypeList,
+      organList: [],
+      statusList: auditTypeList,
       searchForm: {
-        catalogId: null,
+        search: null,
+        paymentType: null,
+        status: null,
+        organId: null,
       },
       tableList: [],
-      formActionTitle: "create",
-      formTitle: {
-        create: "添加帮助中心",
-        update: "修改帮助中心",
-      },
-      typeStatus: false, // 添加教学点
-      formLabelWidth: "100px",
-      form: {
-        title: null, // 标题
-        content: null, // 内容
-        catalogId: null, // 分类编号
-      },
-      rules: {
-        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
-        content: [{ required: true, message: "请输入内容", trigger: "blur" }],
-        catalogId: [
-          { required: true, message: "请输入选择分类", trigger: "blur" },
-        ],
-      },
+
       pageInfo: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -250,70 +227,27 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
+      detail: null,
+      typeStatus: false,
     };
   },
   activated() {
     this.getList();
   },
   mounted() {
+    getEmployeeOrgan().then((res) => {
+      if (res.code == 200) {
+        this.organList = res.data;
+      }
+    });
     this.getList();
   },
   methods: {
-    onTypeDelOpeation(row) {
-      this.$confirm("您是否删除该内容?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          helpCenterContentDelete({ id: row.id }).then((res) => {
-            this.messageTips("删除", res);
-          });
-        })
-        .catch(() => {});
-    },
-    onTypeSubmit(formName) {
-      // 添加数据
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.formActionTitle == "create") {
-            let params = {
-              title: this.form.title, // 标题
-              content: this.form.content, // 内容
-              catalogId: this.form.catalogId[this.form.catalogId.length - 1], // 分类编号
-            };
-            helpCenterContentModify(params).then((res) => {
-              this.messageTips("添加", res);
-            });
-          } else if (this.formActionTitle == "update") {
-            let params = {
-              id: this.form.id,
-              title: this.form.title, // 标题
-              content: this.form.content, // 内容
-              catalogId: this.form.catalogId[this.form.catalogId.length - 1], // 分类编号
-            };
-            helpCenterContentModify(params).then((res) => {
-              this.messageTips("修改", res);
-            });
-          }
-        } else {
-          return false;
-        }
-      });
-    },
-    messageTips(title, res) {
-      if (res.code == 200) {
-        this.$message.success(title + "成功");
-        this.typeStatus = false;
-        this.getList();
-      } else {
-        this.$message.error(res.msg);
-      }
-    },
     getList() {
       let params = {
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
+        ...this.searchForm,
       };
       getAuditList(params).then((res) => {
         let result = res.data;
@@ -323,78 +257,25 @@ export default {
         }
       });
     },
-    setTableData(result) {
-      let list = [];
-      list = result.map((res) => {
-        let tempList = {};
-        tempList = {
-          value: res.id,
-          label: res.text,
-          parentId: res.parentId,
-        };
-        if (res.children && res.children.length > 0) {
-          tempList.children = this.setTableData(res.children);
-        }
-        return tempList;
-      });
-      return list;
-    },
-    openTypes(type, row) {
-      this.typeStatus = true;
-      this.formActionTitle = type;
-      if (type == "update") {
-        // 修改的时候赋值
-        this.form = {
-          id: row.id,
-          title: row.title, // 标题
-          content: row.content, // 内容
-          catalogId: this.getAllIds(row), // 分类编号
-        };
+
+    lookDetail(row) {
+      // this.detail = res.data
+      this.detail = {
+        id:row.musicGroupPaymentCalenderId,
+        musicGroupId:row.musicGroupId
       }
+      this.typeStatus = true;
     },
-    onToUrl() {
-      this.$router.push("/insideSetting/helpCategory");
-    },
-    getAllIds(row) {
-      let idAndParent = []; // idAndParent保存 Tree所有节点的id和parentId
-      this.getIdAndParent(this.treeList, idAndParent);
-      let parentIds = []; // 用于保存选中节点的父节点及父节点的父节点
-      this.getId(row.catalogId, parentIds, idAndParent);
-      return parentIds.reverse(); //反转数组
-    },
-    getIdAndParent(tree, idAndParentIds) {
-      // idAndParentIds用来保存所有节点的id,parentId
-      // 对原有的数据结构进行遍历,拿出所有节点的id,parentId到一个一维数组中。
-      tree.forEach((item) => {
-        let mid = {
-          id: item.value,
-          parentId: item.parentId,
-        };
-        idAndParentIds.push(mid);
-        if (item.children) {
-          this.getIdAndParent(item.children, idAndParentIds);
-        }
-      });
+    close() {
+      this.typeStatus = false;
+      this.getList()
     },
-    getId(id, parentIds, idAndParent) {
-      idAndParent.forEach((item) => {
-        if (item.id == id) {
-          parentIds.push(id);
-          if (item.parentId != -1) {
-            this.getId(item.parentId, parentIds, idAndParent);
-          }
-        }
-      });
-    },
-    onFormClose(formName) {
-      // 关闭弹窗重置验证
-      this.form = {
-        title: null, // 标题
-        content: null, // 内容
-        catalogId: [], // 分类编号
-      };
-      this.$refs.cascader.handleClear();
-      this.$refs[formName].resetFields();
+  },
+  watch: {
+    typeStatus(val) {
+      if (!val) {
+        this.detail = null;
+      }
     },
   },
 };

+ 52 - 18
src/views/categroyManager/specialSetup/modals/chargesForm.vue

@@ -60,12 +60,13 @@
               <el-select v-model.trim="item.courseType"
                           size="mini"
                           clearable
+                          @change="() => courseItemChange(item, index)"
                           filterable>
-                <el-option  v-for="item in courseTypeOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :disabled="isOptionDisabled(item.value)"
-                            :value="item.value">
+                <el-option  v-for="item in courseTypes"
+                            :key="item.courseType"
+                            :label="courseType[item.courseType]"
+                            :disabled="isOptionDisabled(item.courseType)"
+                            :value="item.courseType">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -78,7 +79,7 @@
                           clearable
                           filterable>
                 <el-option  v-for="item in boolOptions"
-                            :key="item.value"
+                            :key="item.label"
                             :label="item.label"
                             :value="item.value">
                 </el-option>
@@ -96,37 +97,38 @@
                 :controls="false"
                 :precision="0"
                 :min="1"
+                @change="() => courseItemChange(item, index)"
                 placeholder="课程总时长"
               />
             </el-form-item>
             <el-form-item
-              :prop="`details.${index}.courseOriginalPrice`"
-              :rules="[{required: true, message: '请输入课程价', trigger: 'blur'}]"
+              :prop="`details.${index}.courseCurrentPrice`"
+              :rules="[{required: true, message: '请输入课程价', trigger: 'blur'}]"
             >
               <el-input-number
                 size="mini"
                 style="width: 90%!important;"
                 class="number-input"
-                v-model="item.courseOriginalPrice"
+                v-model="item.courseCurrentPrice"
                 :controls="false"
                 :precision="0"
                 :min="1"
-                placeholder="课程价"
+                placeholder="课程价"
               />
             </el-form-item>
             <el-form-item
-              :prop="`details.${index}.courseCurrentPrice`"
-              :rules="[{required: true, message: '请输入课程价', trigger: 'blur'}]"
+              :prop="`details.${index}.courseOriginalPrice`"
+              :rules="[{required: true, message: '请输入课程价', trigger: 'blur'}]"
             >
               <el-input-number
                 size="mini"
                 style="width: 90%!important;"
                 class="number-input"
-                v-model="item.courseCurrentPrice"
+                v-model="item.courseOriginalPrice"
                 :controls="false"
                 :precision="0"
                 :min="1"
-                placeholder="课程价"
+                placeholder="课程价"
               />
             </el-form-item>
             <span class="ctrl">
@@ -175,7 +177,11 @@ const initItem = {
   courseOriginalPrice: '',
   courseCurrentPrice: '',
 }
-import { musicGroupOrganizationCourseSettingsAdd, musicGroupOrganizationCourseSettingsUpdate } from '@/api/specialSetting'
+import {
+  musicGroupOrganizationCourseSettingsAdd,
+  musicGroupOrganizationCourseSettingsUpdate,
+  getOrganizationCourseUnitPriceSettings
+} from '@/api/specialSetting'
 import { classTimeList } from '@/utils/searchArray'
 import { courseType, boolOptions } from '@/constant'
 import { objectToOptions }  from '@/utils'
@@ -183,9 +189,9 @@ import numeral from 'numeral'
 
 const plusNum = (items = [], key) => {
   let money = 0
-  const _items = items.filter(item => item.isStudentOptional < 1)
+  const _items = items.filter(item => !item.isStudentOptional)
   for (const item of _items) {
-    money += parseFloat(item[key] || 0).toFixed(2) || 0
+    money += parseFloat(parseFloat(item[key] || 0).toFixed(2) || 0)
   }
   return money
 }
@@ -205,8 +211,11 @@ export default {
     return {
       form: {...initForm},
       formLabelWidth: '120px',
+      courseType,
       courseTypeOptions: objectToOptions(courseType),
       boolOptions: objectToOptions(boolOptions),
+      courseTypes: [],
+      courseTypesByType: {},
     }
   },
   computed: {
@@ -219,14 +228,39 @@ export default {
   },
   watch: {
     rowDetail() {
-      console.log({...this.rowDetail})
       this.updateForm()
+    },
+    async 'form.chargeTypeId'() {
+      try {
+        const res = await getOrganizationCourseUnitPriceSettings({
+          chargeTypeId: this.form.chargeTypeId,
+          rows: 9999
+        })
+        const d = {}
+        this.courseTypes = res.data.rows
+        for (const item of this.courseTypes) {
+          d[item.courseType] = item
+        }
+        this.courseTypesByType = d
+      } catch (error) {}
     }
   },
   mounted() {
     this.updateForm()
   },
   methods: {
+    courseItemChange(item, index) {
+      if (item.courseType) {
+        const active = this.courseTypesByType[item.courseType] || {}
+        const _list = this.form.details
+        _list[index] = {
+          ...item,
+          courseCurrentPrice: Math.ceil(active.unitPrice * (item.courseTotalMinuties || 1)),
+          courseOriginalPrice: Math.ceil(active.unitPrice * (item.courseTotalMinuties || 1))
+        }
+        this.$set(this.form, `details`, [..._list])
+      }
+    },
     updateForm() {
       if (this.rowDetail) {
         const { organId, classTimeList, chargeTypeId, name, details } = this.rowDetail

+ 1 - 1
src/views/luckyDraw/trophyManager.vue

@@ -66,7 +66,7 @@
                         <tooltip :content="scope.row.memo" />
                     </template>
                 </el-table-column>
-                </el-table-column>
+
                 <el-table-column align="center" label="操作">
                     <template slot-scope="scope">
                         <el-button @click="onOperationTrophy('update', scope.row)" v-permission="'luckDrawPrize/update'" type="text">修改</el-button>

+ 20 - 0
src/views/resetTeaming/api.js

@@ -12,3 +12,23 @@ export const musicGroupPaymentCalenderAdd = data => request2({
   data,
   method: 'post',
 })
+
+export const musicGroupPaymentCalenderView = data => request2({
+  url: '/api-web/musicGroupPaymentCalender/auditListDetail',
+  data: {},
+  params: data,
+  method: 'get',
+})
+
+export const getMusicGroupStu = data => request2({
+  url: '/api-web/studentRegistration/getMusicGroupStu',
+  data: {},
+  params: data,
+  method: 'get',
+})
+
+export const musicGroupPaymentCalenderDetailBatchAdd = data => request2({
+  url: '/api-web/musicGroupPaymentCalenderDetail/batchAdd',
+  data: data,
+  method: 'post',
+})

+ 74 - 28
src/views/resetTeaming/components/resetPayList.vue

@@ -19,8 +19,8 @@
       </el-form-item>
 
       <el-form-item>
-        <el-button type="danger" @click="search">搜索</el-button>
-        <el-button @click="onReSet" type="primary">重置</el-button>
+        <el-button type="danger" @click="getList">搜索</el-button>
+        <!-- <el-button @click="onReSet" type="primary">重置</el-button> -->
       </el-form-item>
     </el-form>
     <div class="topWrap">
@@ -46,6 +46,7 @@
                 :data="tableList">
         <el-table-column align="center"
                          prop="startPaymentDate"
+                         width="120"
                          label="缴费开始日期">
           <template slot-scope="scope">
             <div>
@@ -54,6 +55,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
+                         width="120"
                          prop="deadlinePaymentDate"
                          label="缴费结束日期">
 
@@ -65,6 +67,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="expectNum"
+                         width="120"
                          label="预计缴费人数"></el-table-column>
         <el-table-column align="center"
                          prop="paymentPattern"
@@ -77,6 +80,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="paymentValidStartDate"
+                         width="150"
                          label="缴费有效期开始日期">
           <template slot-scope="scope">
             <div>
@@ -86,6 +90,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="paymentValidEndDate"
+                         width="150"
                          label="缴费有效期结束日期">
           <template slot-scope="scope">
             <div>
@@ -95,22 +100,24 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="actualNum"
+                         width="120"
                          label="实际缴费人数"></el-table-column>
         <el-table-column align="center"
-                         prop="type"
-                         label="状态">
+                         prop="status"
+                         label="缴费状态">
           <template slot-scope="scope">
             <div>
-              {{scope.row.type | paymentType}}
+              {{scope.row.status | payTypeStatus}}
             </div>
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="type"
-                         label="缴费状态">
+                         prop="isGiveMusicNetwork"
+                         width="120"
+                         label="是否赠送网管课">
           <template slot-scope="scope">
             <div>
-              {{scope.row.paymentStatus | paymentListStatus}}
+              {{scope.row.isGiveMusicNetwork ? '是' : '否'}}
             </div>
           </template>
         </el-table-column>
@@ -244,6 +251,23 @@
       </div>
     </el-dialog>
     <el-dialog
+      title="查看"
+      :visible.sync="reviewVisible"
+      width="900px"
+      destroy-on-close
+    >
+      <reviewDetail
+        @close="reviewVisible = false"
+        @submited="getList"
+        :detail="viewDetail"
+        :musicGroupId="$route.query.id"
+        destroy-on-close
+      />
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="reviewVisible = false">关闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog
       :title="payFormTitle"
       :visible.sync="userVisible"
       width="800px"
@@ -251,15 +275,18 @@
     >
       <userPayForm
         @close="userVisible = false"
-        @submited="getList"
+        @submited="payedSubmited"
         :type="payFormType"
         :baseInfo="baseInfo"
+        :paymentType="isNewGropu ? 0 : undefined"
         :musicGroupId="$route.query.id"
       />
     </el-dialog>
 
     <el-dialog title="学员选择"
                :visible.sync="chioseStudentVisible"
+               destroy-on-close
+               append-to-body
                width='800px'>
       <setStudentFee @chioseStudent='chioseStudent'
                      ref='setStudentFee'
@@ -286,10 +313,14 @@ import dayjs from 'dayjs'
 import QrCode from "@/components/QrCode/index";
 import { vaildStudentUrl } from '@/utils/validate'
 import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender } from "@/api/buildTeam";
-import { musicGroupPaymentCalenderQueryPage } from '../api'
+import { musicGroupPaymentCalenderQueryPage, getMusicGroupStu, musicGroupPaymentCalenderDetailBatchAdd } from '../api'
 import setStudentFee from './studentPayBase'
 import userPayForm from '../modals/user-pay-form'
 import schoolPayForm from '../modals/school-pay-form'
+import review from '../modals/review'
+import reviewDetail from '../modals/review-detail'
+import { userPaymentType } from '@/constant'
+import { objectToOptions } from '@/utils'
 import { payOrderTypeList}  from "@/utils/searchArray";
 export default {
   props: ['baseInfo','isNewGropu'],
@@ -298,16 +329,21 @@ export default {
     setStudentFee,
     userPayForm,
     schoolPayForm,
-    QrCode
+    QrCode,
+    review,
+    reviewDetail
   },
   data () {
     return {
+      musicGroupStu: [],
       payFormType: 'user',
       userVisible: false,
       schoolVisible: false,
+      reviewVisible: false,
       searchForm: {
         payUserType: null
       },
+      viewDetail: null,
       tableList: [{}],
       rules: {
         // 分页规则
@@ -341,19 +377,22 @@ export default {
       chioseStudentVisible: false,
       chioseStudentList: [],
       clearStduent: true,
-      payOrderTypeList
+      musicGroupPaymentCalenderId: '',
+      payOrderTypeList,
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created () { },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  async mounted () {
     // 获取分部
-
     this.init();
 
   },
   computed: {
+    payOrderTypeList() {
+      return objectToOptions(userPaymentType)
+    },
     payFormTitle() {
       return this.payFormType === 'user' ? '新增学员缴费' : '新增学校缴费'
     }
@@ -362,7 +401,13 @@ export default {
     this.init();
   },
   methods: {
-    init () {
+    async init () {
+      try {
+        const res = await getMusicGroupStu({
+          musicGroupId: this.$route.query.id,
+        })
+        console.log(res)
+      } catch (error) {}
       this.getList()
     },
     newUserPay() {
@@ -432,7 +477,12 @@ export default {
     lookDetail (row) {
       let query = this.$route.query
       this.$route.query.paymentId = row.id;
-      this.$router.push({ path: '/business/strudentPayInfo', query })
+      this.viewDetail = row
+      if (row.payUserType === 'SCHOOL') {
+        this.reviewVisible = row
+      } else {
+        this.$router.push({ path: '/business/strudentPayInfo', query })
+      }
     },
     setStudentPay () {
       let query = this.$route.query
@@ -463,20 +513,13 @@ export default {
       }
 
       let obj = {}
-      obj.studentIds = this.chioseStudentList.map(stu => {
+      obj.userIdList = this.chioseStudentList.map(stu => {
         return stu.userId
-      }).join(',')
-      obj.musicGroupId = this.$route.query.id
-      obj.startPaymentDate = this.payForm.startPaymentDate + ' 00:00:00'
-      obj.deadlinePaymentDate = this.payForm.deadlinePaymentDate + ' 23:59:59'
-      obj.paymentValidStartDate = this.payForm.paymentValidStartDate ? dayjs(this.payForm.paymentValidStartDate).format('YYYY-MM-DD') : this.payForm.paymentValidStartDate,
-        obj.paymentValidEndDate = this.payForm.paymentValidEndDate ? dayjs(this.payForm.paymentValidEndDate).format('YYYY-MM-DD') : this.payForm.paymentValidEndDate,
-        obj.paymentPattern = this.payForm.paymentPattern
-      obj.type = this.payForm.type
-      obj.memo = this.payForm.memo
-      addMusicGroupPaymentCalender(obj).then(res => {
+      })
+      obj.musicGroupPaymentCalenderId = this.musicGroupPaymentCalenderId
+      musicGroupPaymentCalenderDetailBatchAdd(obj).then(res => {
         if (res.code == 200) {
-          this.$message.success('恭喜你创建成功')
+          this.$message.success('添加成功')
           this.$refs.setStudentFee.clearTable()
           this.payVisible = false;
           this.chioseStudentVisible = false;
@@ -538,6 +581,9 @@ export default {
 
   },
   watch: {
+    chioseStudentVisible() {
+      this.chioseStudentList = []
+    },
     payVisible (val) {
       if (!val) {
         this.payForm = {

+ 8 - 1
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -386,6 +386,12 @@ export default {
     this.init();
   },
   activated () {
+    this.teamid = this.$route.query.id;
+    findSound({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.soundList = res.data;
+      }
+    });
     this.init();
   },
   methods: {
@@ -489,6 +495,7 @@ export default {
       })
     },
     addStudentBtn () {
+      console.log('musicGroupId:', this.teamid, 'musicGroupPaymentCalenderId:', this.id)
       // 获取无缴费学员
       queryCanAddStudent({ musicGroupId: this.teamid, musicGroupPaymentCalenderId: this.id }).then(res => {
         if (res.code == 200) {
@@ -666,4 +673,4 @@ export default {
     margin-right: 20px;
   }
 }
-</style>
+</style>

+ 6 - 6
src/views/resetTeaming/components/studentPayBase.vue

@@ -31,9 +31,9 @@
                    type="primary">重置</el-button>
       </el-form-item>
     </el-form>
-    <div class="newBand"
+    <!-- <div class="newBand"
          @click="resetPays"
-         v-permission="'musicGroupStudentFee/batchUpdateCourseFee'">修改缴费金额</div>
+         v-permission="'musicGroupStudentFee/batchUpdateCourseFee'">修改缴费金额</div> -->
     <div class="tableWrap">
       <el-table style="width: 100%"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}"
@@ -70,8 +70,8 @@
         </el-table-column> -->
         <el-table-column align="center"
                          prop="courseFee"
-                         label="缴费金额"></el-table-column>
-        <el-table-column align="center"
+                         label="缴费金额(元)"></el-table-column>
+        <!-- <el-table-column align="center"
                          label="操作">
           <template slot-scope="scope">
             <div>
@@ -80,7 +80,7 @@
                          @click="resetPay(scope.row)">修改金额</el-button>
             </div>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
       <!-- <pagination :total="rules.total"
                   :page.sync="rules.page"
@@ -284,4 +284,4 @@ export default {
   height: 300px;
   overflow: auto;
 }
-</style>
+</style>

+ 48 - 5
src/views/resetTeaming/modals/extra-class.vue

@@ -21,6 +21,7 @@
               v-model="list.form[scope.$index].courseType"
               placeholder="课程类型"
               clearable
+              :disabled="isDisabled"
             >
               <el-option
                 v-for="(item, index) in courseTypeOptions"
@@ -34,6 +35,7 @@
       </el-table-column>
       <el-table-column
         label="是否可选"
+        v-if="isCommon"
         width="150">
         <template slot-scope="scope">
           <el-form-item
@@ -45,6 +47,7 @@
               size="small"
               v-model="list.form[scope.$index].isStudentOptional"
               placeholder="是否可选"
+              :disabled="isDisabled"
               clearable
             >
               <el-option
@@ -73,6 +76,7 @@
               :controls="false"
               :precision="0"
               :min="1"
+              :disabled="isDisabled"
               placeholder="课程时长"
             />
           </el-form-item>
@@ -80,16 +84,51 @@
       </el-table-column>
       <el-table-column
         label="现价(元)"
-        width="120">
+        width="150">
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseCurrentPrice'"
+            :rules="{ required: true, message: '请输入现价', trigger: 'blur' }"
+          >
+            <!-- $listeners.moneyChange -->
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              v-model="list.form[scope.$index].courseCurrentPrice"
+              :controls="false"
+              :precision="0"
+              :min="1"
+              @change="change"
+              :disabled="!isUserType"
+              placeholder="请输入现价"
+            />
+          </el-form-item>
+        </template>
       </el-table-column>
       <el-table-column
-        label="原价(元)"
-        width="100">
+        label="原价(元)">
         <template slot-scope="scope">
-          {{ getOldMoney(scope.$index) }}
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseOriginalPrice'"
+            :rules="{ required: true, message: '请输入原价', trigger: 'blur' }"
+          >
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              disabled
+              v-model="list.form[scope.$index].courseOriginalPrice"
+              :controls="false"
+              :precision="0"
+              :min="1"
+              placeholder="请输入原价"
+            />
+          </el-form-item>
         </template>
       </el-table-column>
       <el-table-column
+        v-if="!isCommon"
         width="60">
         <template slot-scope="scope">
           <i v-if="form.length > 1" @click="$listeners.remove(scope.$index)" class="el-icon-circle-close"></i>
@@ -99,6 +138,7 @@
     <el-button
       icon="el-icon-circle-plus-outline"
       plain
+      v-if="!isCommon"
       type="info"
       size="small"
       style="width: 100%;margin: 20px 0;"
@@ -111,7 +151,7 @@ import { courseType, boolOptions } from '@/constant'
 import { objectToOptions } from '@/utils'
 import numeral from 'numeral'
 export default {
-  props: ['form'],
+  props: ['form', 'isCommon', 'isDisabled', 'isUserType'],
   data() {
     return {
       courseTypeOptions: objectToOptions(courseType),
@@ -126,6 +166,9 @@ export default {
     }
   },
   methods: {
+    change(val) {
+      this.$listeners.moneyChange()
+    },
     getOldMoney(index) {
       return numeral(this.list.form[index].courseTotalMinuties * this.list.form[index].unitPrice).format('0,0.00')
     }

+ 40 - 0
src/views/resetTeaming/modals/other.vue

@@ -0,0 +1,40 @@
+<template>
+  <el-form
+    label-width="160px"
+    :model="form"
+    ref="form"
+    label-suffix=": "
+  >
+    <el-form-item
+      label="是否赠送乐团网管课"
+      prop="isGiveMusicNetwork"
+      :rules="[{required: true, message: '请选择是否赠送乐团网管课', trigger: 'change'}]"
+    >
+      <el-radio-group style="width: 100%" v-model="form.isGiveMusicNetwork">
+        <el-radio :label="true">是</el-radio>
+        <el-radio :label="false">否</el-radio>
+      </el-radio-group>
+    </el-form-item>
+    <el-form-item
+      label="备注"
+      prop="memo"
+      :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]"
+    >
+      <el-input type="textarea" v-model="form.memo"></el-input>
+    </el-form-item>
+  </el-form>
+</template>
+<script>
+export default {
+  props: ['form'],
+}
+</script>
+<style lang="less" scoped>
+.number-input{
+  /deep/ .el-input__inner {
+    text-align: left;
+  }
+
+  width: 100%;
+}
+</style>

+ 5 - 3
src/views/resetTeaming/modals/payment-cycle.vue

@@ -8,15 +8,16 @@
   >
     <el-form-item
       label="缴费金额(元)"
-      prop="money"
+      prop="paymentAmount"
       :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
     >
       <el-input-number
         class="number-input"
-        v-model="form.money"
+        v-model="form.paymentAmount"
         :controls="false"
         :precision="2"
         :min="1"
+        :disabled="isUserType && isCommon"
         placeholder="请输入缴费金额"
       />
     </el-form-item>
@@ -37,6 +38,7 @@
     <el-form-item
       label="缴费时间"
       prop="paymentDate"
+      v-if="isUserType"
       :rules="[{required: true, message: '请选择缴费时间', trigger: 'blur'}]"
     >
       <el-date-picker
@@ -68,7 +70,7 @@
 import { paymentPatternType } from '@/constant'
 import { objectToOptions } from '@/utils'
 export default {
-  props: ['form', 'className'],
+  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon'],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),

+ 149 - 0
src/views/resetTeaming/modals/review-detail.vue

@@ -0,0 +1,149 @@
+<template>
+  <div>
+    <el-alert title="申请信息" :closable="false" class="alert" type="info">
+    </el-alert>
+    <descriptions :column="2">
+      <descriptions-item label="分部名称:">{{
+        auditDto.organName
+      }}</descriptions-item>
+      <descriptions-item label="乐团名称:">{{
+        auditDto.musicGroupName
+      }}</descriptions-item>
+      <descriptions-item label="乐团编号:">{{
+        auditDto.musicGroupId
+      }}</descriptions-item>
+      <descriptions-item label="申请时间:">{{
+        auditDto.createTime
+      }}</descriptions-item>
+      <descriptions-item label="申请类型:">{{
+        auditDto.paymentType | userPaymentTypeFormat
+      }}</descriptions-item>
+      <descriptions-item label="订单类型:">{{
+        auditDto.payUserType | payUserTypeFormat
+      }}</descriptions-item>
+      <descriptions-item label="学员数量:">{{ studentNum }}</descriptions-item>
+    </descriptions>
+    <el-alert title="课程信息" :closable="false" class="alert" type="info">
+    </el-alert>
+    <descriptions :column="3">
+      <descriptions-item label="收费标准:">{{
+        musicGroupPaymentCalenderCourseSettingName
+      }}</descriptions-item>
+    </descriptions>
+    <el-table
+      :data="musicGroupPaymentCalenderCourseSettings"
+      stripe
+      style="width: 100%; margin-top: 10px"
+    >
+      <el-table-column prop="courseType" label="课程类型" width="120">
+        <template slot-scope="scope">
+          {{ scope.row.courseType | courseTypeFormat }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="isStudentOptional" label="是否免费" width="100">
+      </el-table-column>
+      <el-table-column prop="courseTotalMinuties" label="课程总时长(分钟)">
+      </el-table-column>
+      <el-table-column prop="courseCurrentPrice" label="现价(元)">
+      </el-table-column>
+      <el-table-column prop="courseOriginalPrice" label="原价(元)">
+      </el-table-column>
+    </el-table>
+    <el-alert title="缴费周期" :closable="false" class="alert" type="info">
+    </el-alert>
+    <descriptions :column="2">
+      <descriptions-item label="缴费金额:">{{
+        auditDto.paymentAmount|moneyFormat
+      }}</descriptions-item>
+      <descriptions-item label="缴费方式:">{{
+        auditDto.paymentPattern | paymentPatternTypeFormat
+      }}</descriptions-item>
+      <descriptions-item
+        v-if="auditDto.payUserType !== 'SCHOOL'"
+        label="缴费日期:"
+        >{{ auditDto.startPaymentDate|dayjsFormat }} -
+        {{ auditDto.deadlinePaymentDate|dayjsFormat }}</descriptions-item
+      >
+      <descriptions-item label="缴费有效期:"
+        >{{ auditDto.paymentValidStartDate }} -
+        {{ auditDto.paymentValidEndDate }}</descriptions-item
+      >
+    </descriptions>
+    <el-alert title="其他" :closable="false" class="alert" type="info">
+    </el-alert>
+    <descriptions :column="2">
+      <descriptions-item label="是否赠送乐团网管课:">{{
+        auditDto.isGiveMusicNetwork ? "是" : "否"
+      }}</descriptions-item>
+      <descriptions-item label="备注:">{{ auditDto.memo }}</descriptions-item>
+    </descriptions>
+  </div>
+</template>
+<script>
+import Vue from "vue";
+import { musicGroupPaymentCalenderView } from "../api";
+import descriptions from "@/components/Descriptions";
+Vue.use(descriptions);
+const initData = {
+  auditDto: {},
+  musicGroupPaymentCalenderCourseSettings: [],
+  simpleUserDto: [],
+  studentNum: 0,
+};
+export default {
+  props: ["detail"],
+  data() {
+    return {
+      ...initData,
+    };
+  },
+  computed: {
+    musicGroupPaymentCalenderCourseSettingName() {
+      const active = this.musicGroupPaymentCalenderCourseSettings[0];
+      if (active) {
+        return active.name;
+      }
+      return "";
+    },
+  },
+  mounted() {
+    this.init();
+  },
+  activated() {
+    this.init();
+  },
+  methods: {
+    async init() {
+        try {
+          const res = await musicGroupPaymentCalenderView({
+            calenderId: this.detail.id,
+            musicGroupId: this.detail.musicGroupId,
+          });
+          for (const key in initData) {
+            if (initData.hasOwnProperty(key)) {
+              this[key] = res.data[key];
+            }
+          }
+        } catch (error) {}
+    },
+  }
+};
+</script>
+<style lang="less" scoped>
+.alert {
+  margin: 10px 0;
+}
+// /deep/ .description-view{
+//   border: none;
+//     .description-tr{
+//       border-bottom: none;
+//     }
+//     .description-label{
+//       border-right: none;
+//       background-color: transparent;
+//     }
+//     .description-content{
+//       border-right: none;
+//     }
+// }
+</style>

+ 64 - 0
src/views/resetTeaming/modals/review.vue

@@ -0,0 +1,64 @@
+<template>
+  <div>
+    <reviewDetail v-if="detail && detail.id" :detail="detail" />
+    <el-alert title="审核意见" :closable="false" class="alert" type="info">
+    </el-alert>
+    <el-input
+      type="textarea"
+      :autosize="{ minRows: 2, maxRows: 4 }"
+      placeholder="请输入审核意见"
+      v-model="remark"
+    >
+    </el-input>
+    <div slot="footer" class="dialog-footer">
+      <!-- <el-button @click="$listeners.close">取 消</el-button> -->
+      <el-button type="primary" @click="submit(1)">审核通过</el-button>
+      <el-button type="danger" @click="submit(0)">驳回</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import Vue from "vue";
+import reviewDetail from "./review-detail";
+import { auditPass, auditRefuse } from "@/api/auditManager";
+export default {
+  props: ["detail"],
+  components: {
+    reviewDetail,
+  },
+  data() {
+    return {
+      remark: "",
+    };
+  },
+  methods: {
+    async submit(val) {
+      if (!this.remark) {
+        return this.$message.error("请输入审核意见");
+      }
+      if (val) {
+        auditPass({calenderId:this.detail.id,auditMemo:this.remark}).then((res) => {
+          if(res.code == 200){
+            this.$message.success('审核通过')
+            this.$emit('close')
+          }
+        });
+      } else {
+           auditRefuse({calenderId:this.detail.id,auditMemo:this.remark}).then((res) => {
+          if(res.code == 200){
+            this.$message.success('驳回成功')
+             this.$emit('close')
+          }
+        });
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.dialog-footer {
+  margin-top: 20px;
+  display: block;
+  text-align: right;
+}
+</style>

+ 15 - 59
src/views/resetTeaming/modals/user-baseinfo.vue

@@ -9,13 +9,14 @@
       label="缴费类型"
       prop="leixing"
       :rules="[{required: true, message: '请选择缴费类型', trigger: 'change'}]"
+      v-if="typeof paymentType === 'undefined'"
     >
       <el-radio-group style="width: 100%" v-model="form.leixing">
         <el-radio label="1">乐团课程</el-radio>
         <el-radio label="2">临时加课</el-radio>
       </el-radio-group>
     </el-form-item>
-    <el-form-item
+    <!-- <el-form-item
       label="乐团模式"
       prop="moshi"
       v-if="isCommon"
@@ -34,7 +35,7 @@
           :value="item.id">
         </el-option>
       </el-select>
-    </el-form-item>
+    </el-form-item> -->
     <el-form-item
       label="收费标准"
       prop="musicGroupOrganizationCourseSettingId"
@@ -50,67 +51,22 @@
         </el-option>
       </el-select>
     </el-form-item>
-    <el-form-item
-      label="是否赠送乐团网管课"
-      prop="isGiveMusicNetwork"
-      :rules="[{required: true, message: '请选择是否赠送乐团网管课', trigger: 'change'}]"
-    >
-      <el-radio-group style="width: 100%" v-model="form.isGiveMusicNetwork">
-        <el-radio :label="true">是</el-radio>
-        <el-radio :label="false">否</el-radio>
-      </el-radio-group>
-    </el-form-item>
-    <el-form-item
-      label="备注"
-      prop="memo"
-      :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]"
-    >
-      <el-input type="textarea" v-model="form.memo"></el-input>
-    </el-form-item>
-    <!-- <el-form-item
-      label="缴费金额(元)"
-      prop="money"
-      :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
-    >
-      <el-input-number
-        class="number-input"
-        v-model="form.money"
-        :controls="false"
-        :precision="2"
-        :min="1"
-        placeholder="请输入缴费金额"
-      />
-    </el-form-item> -->
-    <!-- <el-form-item
-      label="缴费有效期"
-      prop="value2"
-      v-if="!isUserType"
-      :rules="[{required: true, message: '请选择缴费有效期', trigger: 'blur'}]"
-    >
-      <el-date-picker
-        v-model="form.value2"
-        type="daterange"
-        style="width: 100%;"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期">
-      </el-date-picker>
-    </el-form-item> -->
+    <el-alert
+      :closable="false"
+      style="margin-left: 160px;width: auto;"
+      v-if="isCommon"
+      type="warning">
+      <template #title>
+        <p>该乐团为3.0模式,若需创建其他模式的收费标准,请先乐团基本信息的乐团模式
+          <strong style="font-weight: 600;margin-left: 10px;cursor: pointer;">立即修改>></strong>
+      </p>
+      </template>
+    </el-alert>
   </el-form>
 </template>
 <script>
 export default {
-  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges'],
-  data() {
-    return {
-      options: [
-        {
-          value: 1,
-          label: 1
-        }
-      ],
-    }
-  },
+  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges', 'paymentType'],
   mounted() {
     console.log(this.form)
   },

+ 62 - 18
src/views/resetTeaming/modals/user-pay-form.vue

@@ -13,6 +13,7 @@
       @getCharges="getCharges"
       :typeList="typeList"
       :charges="charges"
+      :paymentType="paymentType"
       ref="base"
     />
     <template v-if="!isCommon">
@@ -27,16 +28,21 @@
         ref="eclass"
         @create="addExtraClass"
         @remove="removeExtraClass"
+        @moneyChange="syncAllMoney"
       />
     </template>
     <extraClass
-      v-else
+      v-else-if="(!isCommon && eclass.length) || isCommon"
       :form="eclass"
       ref="eclass"
+      :isCommon="isCommon"
       @create="addExtraClass"
       @remove="removeExtraClass"
+      @moneyChange="syncAllMoney"
+      :isUserType="isUserType"
+      :isDisabled="form.leixing === '1' || paymentType == '0'"
     />
-    <template v-if="isUserType">
+    <template>
       <el-alert
         title="缴费设置"
         :closable="false"
@@ -45,7 +51,10 @@
       </el-alert>
       <paymentCycle
         ref="cycle"
+        :isUserType="isUserType"
         :form.sync="cycle"
+        :isCommon="isCommon"
+        :isDisabled="form.leixing === '1' || paymentType == '0'"
       />
     </template>
     <el-alert
@@ -54,6 +63,10 @@
       class="alert"
       type="info">
     </el-alert>
+    <otherform
+      :form="other"
+      ref="other"
+    />
     <div slot="footer" class="dialog-footer">
       <el-button @click="$listeners.close">取 消</el-button>
       <el-button
@@ -81,25 +94,35 @@ import userBaseinfo from './user-baseinfo'
 import paymentCycle from './payment-cycle'
 import extraClass from './extra-class'
 import classrooms from './classrooms'
+import otherform from './other'
+
+const paymentTypeFormat = {
+  0: 'MUSIC_APPLY',
+  1: 'MUSIC_RENEW',
+  2: 'ADD_COURSE',
+  3: 'ADD_STUDENT',
+}
 
 export default {
-  props: ['type', 'musicGroupId', 'baseInfo'],
+  props: ['type', 'musicGroupId', 'baseInfo', 'paymentType'],
   components: {
     userBaseinfo,
     paymentCycle,
     extraClass,
     classrooms,
+    otherform
   },
   data() {
     return {
       options: [],
       form: {
         payUserType: this.type === 'user' ? 'STUDENT' : 'SCHOOL',
-        leixing: '0',
+        leixing: '1',
       },
+      other: {},
       cycles: [{}],
       cycle: {},
-      eclass: [{}],
+      eclass: [],
       collapse: [],
       nextVisible: false,
       typeList: [],
@@ -110,6 +133,10 @@ export default {
     isCommon() {
       return this.form.leixing === '1'
     },
+    isDisabled() {
+      console.log(this.form.leixing === '1' || String(this.paymentType) === '0')
+      return this.form.leixing === '1' || String(this.paymentType) === '0'
+    },
     isUserType() {
       return this.type === 'user'
     },
@@ -125,26 +152,42 @@ export default {
     },
   },
   watch: {
-    eclass() {
-      console.log([...this.eclass])
+    type() {
+      this.$set(this.form, 'payUserType', this.type === 'user' ? 'STUDENT' : 'SCHOOL')
     },
     baseInfo() {
-      const chargeTypeId = this.baseInfo?.musicGroup?.chargeTypeId
-      this.getCharges(chargeTypeId)
+      this.getCharges()
     },
     'form.leixing'() {
       this.cycles = [{}]
       this.collapse = [0]
       this.cycle = {}
+      this.cycle.paymentAmount = ''
+      if (this.form.leixing === '1') {
+        this.eclass = []
+      } else if (this.form.leixing === '2') {
+        this.eclass = [{}]
+        this.$set(this.form, 'musicGroupOrganizationCourseSettingId', '')
+      }
     },
     'form.musicGroupOrganizationCourseSettingId'() {
-      this.eclass = this.chargesById[this.form.musicGroupOrganizationCourseSettingId]?.details || []
+      const eclas = this.chargesById[this.form.musicGroupOrganizationCourseSettingId]
+      this.eclass = eclas?.details || []
+      this.syncAllMoney()
     }
   },
   mounted() {
-    this.getChargeTypeList()
+    this.getCharges()
   },
   methods: {
+    syncAllMoney() {
+      let money = 0
+      for (const item of this.eclass) {
+        money += item.courseCurrentPrice
+      }
+      this.$set(this.cycle, 'paymentAmount', money)
+      return money
+    },
     async getChargeTypeList() {
       try {
         const res = await chargeTypeList({
@@ -153,7 +196,8 @@ export default {
         this.typeList = res.data.rows
       } catch (error) {}
     },
-    async getCharges(chargeTypeId) {
+    async getCharges() {
+      const chargeTypeId = this.baseInfo?.musicGroup?.chargeTypeId
       try {
         const res = await musicGroupOrganizationCourseSettingsQueryPage({
           row: 9999,
@@ -186,13 +230,12 @@ export default {
     },
     getForms() {
       const { $refs: refs } = this
-      return [refs.base, refs.eclass, refs.cycle]
+      return [refs.base, refs.eclass, refs.cycle, refs.other]
         .filter(item => !!item)
         .map(item => item.$refs.form)
     },
     async submit() {
       const forms = this.getForms()
-      console.log(forms)
       const valided = []
       for (const form of forms) {
         form.validate(valid => {
@@ -202,18 +245,19 @@ export default {
         })
       }
       if (valided.length === forms.length) {
-        const { paymentDate, paymentValid, leixing, ...rest } = {...this.form, ...this.cycle, musicGroupPaymentCalenderCourseSettingsList: this.eclass}
+        const { paymentDate, paymentValid, leixing, ...rest } = {...this.form, ...this.other, ...this.cycle, musicGroupPaymentCalenderCourseSettingsList: this.eclass}
         const data = {
           ...rest,
-          paymentType: leixing,
+          paymentType: paymentTypeFormat[(this.paymentType == 0 ? this.paymentType : leixing)],
           musicGroupId: this.musicGroupId,
           ...getTimes(paymentDate, ['startPaymentDate', 'deadlinePaymentDate']),
           ...getTimes(paymentValid, ['paymentValidStartDate', 'paymentValidEndDate']),
         }
         try {
-          await musicGroupPaymentCalenderAdd(data)
+          const res = await musicGroupPaymentCalenderAdd(data)
+          this.$listeners.close()
+          this.$listeners.submited(res.data)
         } catch (error) {}
-        // this.nextVisible = true
       }
     }
   },

+ 2 - 2
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -476,7 +476,7 @@ export default {
         schoolId: this.topfor.address,
         expectStartGroupDate: this.topfor.startTime,
         isClassroomLessons: this.topfor.isClass,
-        status: "DRAFT",
+        status: 'DRAFT',
         ownershipType: this.topfor.ownershipType,
         repairUserId: this.topfor.repairUserId,
         feeType: this.topfor.feeType,
@@ -545,4 +545,4 @@ export default {
 /deep/.el-collapse-item__header {
   border-bottom: 1px solid #fff;
 }
-</style>
+</style>

+ 28 - 2
src/views/teamBuild/components/teamSoundSet.vue

@@ -22,16 +22,19 @@
       >
         下一步
       </div>
-      <div
+      <!-- <div
         class="submitBtn"
         @click="submitAudit(1)"
         v-if="teamStatus != 'teamAudit'"
       >
         提交审核
-      </div>
+      </div> -->
       <div class="submitBtn" @click="approval" v-if="teamStatus == 'teamAudit'">
         审核通过
       </div>
+       <div class="submitBtn" @click="refuse" v-if="teamStatus == 'teamAudit'">
+        驳回
+      </div>
     </div>
   </div>
 </template>
@@ -112,6 +115,29 @@ export default {
         })
         .catch(() => {});
     },
+        refuse () {
+      // auditFailed
+      this.$prompt("请输入拒绝原因", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消"
+      }).then(({ value }) => {
+        //   点击确认  值是value
+        if (!value) {
+          this.$message.error("请输入驳回原因");
+          return;
+        } else {
+          auditFailed({ musicGroupId: this.teamid, memo: value }).then(res => {
+            if (res.code == 200) {
+              this.$message.success("已拒绝");
+              this.$router.push({
+                path: "/business/teamDetail",
+                query: { search: this.Fsearch, rules: this.Frules }
+              });
+            }
+          });
+        }
+      });
+    },
   },
 
   computed: {},

+ 69 - 22
src/views/teamDetail/components/modals/classroom-setting-item.vue

@@ -2,62 +2,97 @@
   <div>
     <el-form-item
       label="排课次数"
+      prop="courseNum"
     >
-      <el-input placeholder="请输入排课次数"/>
+      <el-input v-model="form.courseNum" placeholder="请输入排课次数"/>
     </el-form-item>
     <el-form-item
       label="排课起始时间"
+      prop="courseTime"
     >
-      <el-input placeholder="请输入排课起始时间"/>
+      <el-date-picker v-model.trim="form.courseTime"
+        :picker-options="pickerOptions"
+        style="width:100%!important;"
+        type="date"
+        value-format="yyyy-MM-dd"
+        placeholder="选择日期">
+      </el-date-picker>
     </el-form-item>
     <el-form-item
       label="跳过节假日"
     >
-      <el-radio-group>
+      <el-radio-group v-model="form.checked">
         <el-radio :label="3">是</el-radio>
         <el-radio :label="6">否</el-radio>
       </el-radio-group>
     </el-form-item>
     <el-table
+      v-if="form && form.cycle"
       :data="form.cycle"
     >
       <el-table-column
         prop="date"
         label="循环周期"
         width="180">
-        <template>
-          <el-form-item inline-message>
-            <el-input placeholder="请输入循环周期"/>
+        <template slot-scope="scope">
+          <el-form-item inline-message prop="dayOfWeek">
+            <el-select v-model.trim="scope.row.dayOfWeek"
+              style="width:100%!important"
+              placeholder="请选择循环周期"
+              clearable
+              filterable>
+              <el-option v-for="(item,index) in weekDateList"
+                :key="index"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
           </el-form-item>
         </template>
       </el-table-column>
       <el-table-column
-        prop="date"
+        prop="time"
         label="课程时长(分)"
         width="180">
-        <template>
+        <template slot-scope="scope">
           <el-form-item inline-message>
-            <el-input placeholder="请输入课程时长"/>
+            <el-input v-model="scope.row.time" placeholder="请输入课程时长"/>
           </el-form-item>
         </template>
       </el-table-column>
       <el-table-column
-        prop="date"
+        prop="startClassTime"
         label="开始时间"
         width="180">
-        <template>
+        <template slot-scope="scope">
           <el-form-item inline-message>
-            <el-input placeholder="请输入课程时长"/>
+            <el-time-picker style="width: 100%!important;"
+              v-model.trim="scope.row.startClassTime"
+              format='HH:mm'
+              value-format='HH:mm'
+              placeholder="请选择时间"
+              :picker-options="{
+                selectableRange: ['04:30:00 - 23:59:59']
+              }">
+            </el-time-picker>
           </el-form-item>
         </template>
       </el-table-column>
       <el-table-column
-        prop="date"
+        prop="endClassTime"
         label="结束时间"
         width="180">
-        <template>
+        <template slot-scope="scope">
           <el-form-item inline-message>
-            <el-input  placeholder="请输入课程时长"/>
+            <el-time-picker style="width: 100%!important;"
+              v-model.trim="scope.row.endClassTime"
+              format='HH:mm'
+              value-format='HH:mm'
+              placeholder="请选择时间"
+              :picker-options="{
+                selectableRange: [scope.row.startClassTime + ':00 - 23:59:59']
+              }">
+            </el-time-picker>
           </el-form-item>
         </template>
       </el-table-column>
@@ -83,11 +118,25 @@
 <script>
 export default {
   props: ['form'],
-  created() {
-    if (!this.form) {
-      this.form = {
-        cycle: [{}]
+  computed: {
+    pickerOptions() {
+      return {
+        firstDayOfWeek: 1,
+        disabledDate (time) {
+          return time.getTime() + 86400000 <= new Date().getTime();
+        }
       }
+    },
+    weekDateList() {
+      return [
+        { value: "1", label: "星期一" },
+        { value: "2", label: "星期二" },
+        { value: "3", label: "星期三" },
+        { value: "4", label: "星期四" },
+        { value: "5", label: "星期五" },
+        { value: "6", label: "星期六" },
+        { value: "7", label: "星期日" }
+      ]
     }
   },
   methods: {
@@ -95,9 +144,7 @@ export default {
       this.form.cycle.push({})
     },
     remove(index) {
-      const list = [...this.form.cycle]
-      list[index] = null
-      this.form.cycle = list.map(item => !!item)
+      this.form.cycle.splice(index, 1)
     }
   },
 }

+ 60 - 6
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -3,10 +3,14 @@
     <el-form
       :model="form"
       inline
+      ref="form"
       label-suffix=": "
       label-width="100px"
     >
-      <el-form-item label="主教老师">
+      <el-form-item
+        label="主教老师"
+        :rules="[{ required: true, message: '请选择主教老师' }]"
+      >
         <el-select
           v-model.trim="form.coreTeacher"
           placeholder="请选择主教老师"
@@ -61,28 +65,71 @@
   </div>
 </template>
 <script>
+import { getMusicCourseSettingsWithStudents, classGroupUpdate } from '@/api/buildTeam'
 import courseItem from "./classroom-setting-item";
 export default {
-  props: ["teacherList", "activeType", "courseTypeList", 'cooperationList'],
+  props: ["teacherList", "activeType", "courseTypeList", 'cooperationList', 'musicGroupId', 'detail'],
   components: {
     courseItem,
   },
   data() {
     return {
       form: {
-        coreTeacher: "",
+        coreTeacher: '',
         assistant: '',
         classs: {}
       },
       collapses: [0],
     };
   },
-  mounted() {
-    console.log(this.courseTypeList);
+  created() {
+    const classs = {}
+    for (const item of this.courseTypeList) {
+      classs[item.value] = {
+        cycle: [{}]
+      }
+    }
+    this.form.classs = classs
+  },
+  async mounted() {
+    console.log(this.detail)
+    try {
+      await getMusicCourseSettingsWithStudents({
+        musicGroupId: this.musicGroupId,
+        studentIds: this.detail.subjectIdList
+      })
+    } catch (error) {}
   },
   methods: {
     submit() {
-
+      this.$refs.form.validate(async valid => {
+        if (valid) {
+          console.log({...this.form})
+          const list = []
+          for (const key in this.form.classs) {
+            if (this.form.classs.hasOwnProperty(key)) {
+              const item = this.form.classs[key];
+              list.push({
+                type: key,
+                classGroupId: this.detail?.id,
+                startDate: item.courseTime,
+                coreTeacher: this.form.coreTeacher,
+                assistant: this.form.assistant,
+                courseTimeDtoList: item.cycle.map(_ => ({
+                  courseType: key,
+                  dayOfWeek: _.dayOfWeek,
+                  endClassTime: _.endClassTime,
+                  startClassTime: _.startClassTime
+                }))
+              })
+            }
+          }
+          try {
+            await classGroupUpdate(list)
+            tthis.$message.success('排课成功')
+          } catch (error) {}
+        }
+      })
     },
     collapseChange(val) {
       this.collapses = val
@@ -90,3 +137,10 @@ export default {
   },
 };
 </script>
+<style lang="less" scoped>
+  .dialog-footer{
+    margin-top: 20px;
+    display: block;
+    text-align: right;
+  }
+</style>

+ 4 - 0
src/views/teamDetail/components/resetClass.vue

@@ -301,9 +301,11 @@
     >
       <classroomSetting
         :teacherList="teacherList"
+        :musicGroupId="teamid"
         :activeType="activeType"
         :courseTypeList="courseTypeList"
         :cooperationList="cooperationList"
+        :detail="infoDetail"
         @close="infoVisible = false"
       />
     </el-dialog>
@@ -771,6 +773,7 @@ export default {
       topForm: {
         classType: ""
       },
+      infoDetail: null,
       classTimeList,
       tableList: [],
       maxClassList: [],
@@ -1172,6 +1175,7 @@ export default {
     },
     // 班级调整
     classAdjustment (row) {
+      this.infoDetail = row
       this.activeType = row.type;
       this.activeClass = row.id;
       // this.activeListStudent = row.subjectIdList.split(',')

+ 10 - 10
src/views/teamDetail/components/studentList.vue

@@ -349,7 +349,7 @@
                             placeholder="选择日期"></el-date-picker>
           </el-col>
         </el-form-item>
-        <br />
+        <!-- <br />
         <el-form-item label="单技班">
           <el-select v-model.trim="maskForm.signClass"
                      filterable
@@ -359,8 +359,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="合奏班">
+        </el-form-item> -->
+        <!-- <el-form-item label="合奏班">
           <el-select v-model.trim="maskForm.mixClass"
                      filterable
                      clearable>
@@ -369,8 +369,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="基础技能班">
+        </el-form-item> -->
+        <!-- <el-form-item label="基础技能班">
           <el-select v-model.trim="maskForm.highClass"
                      filterable
                      clearable>
@@ -379,8 +379,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="临时班">
+        </el-form-item> -->
+        <!-- <el-form-item label="临时班">
           <el-select v-model.trim="maskForm.snapClass"
                      filterable
                      clearable
@@ -390,7 +390,7 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <!-- <el-form-item label="线上基础技能班">
           <el-select v-model.trim="maskForm.highonline"
                      filterable
@@ -487,7 +487,7 @@
             </el-form-item>
           </el-col>
         </el-form-item> -->
-        <el-alert
+        <!-- <el-alert
           title="缴费周期设置"
           :closable="false"
           class="alert"
@@ -519,7 +519,7 @@
           size="small"
           style="width: 100%;margin: 20px 0;"
           @click="addCycle"
-        >新增缴费周期</el-button>
+        >新增缴费周期</el-button> -->
       </el-form>
       <div slot="footer"
            class="dialog-footer">