فهرست منبع

11/03 20:23

111
Xiao_Mo 4 سال پیش
والد
کامیت
431b0341bf

+ 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)
+    })
+}

+ 59 - 216
src/views/auditList/index.vue

@@ -74,7 +74,6 @@
         >
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column
-           
             align="center"
             prop="organName"
             label="分部名称"
@@ -125,27 +124,28 @@
             prop="courseCurrentPrice"
             label="申请价格(元)"
           >
-               <template slot-scope="scope">
+            <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 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 align="center" prop="auditStatus" label="状态"  width="100px">
+          <el-table-column
+            align="center"
+            prop="auditStatus"
+            label="状态"
+            width="100px"
+          >
             <template slot-scope="scope">
               <div>
                 {{ scope.row.auditStatus | auditType }}
@@ -158,17 +158,23 @@
             label="申请时间"
             width="140px"
           >
-           <template slot-scope="scope">
+            <template slot-scope="scope">
               <div>
                 {{ scope.row.createTime | dateForMinFormat }}
               </div>
-            </template></el-table-column>
+            </template></el-table-column
+          >
           <!--  -->
-          <el-table-column align="center" label="操作" width="100px" fixed="right">
+          <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)"
+                @click="lookDetail(scope.row)"
                 type="text"
                 >查看</el-button
               >
@@ -184,97 +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 { getEmployeeOrgan}from "@/api/buildTeam" 
-import Tooltip from '@/components/Tooltip/index'
-import {auditTypeList,auditPaymentTypeList} from '@/utils/searchArray'
+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,Tooltip },
+  components: { pagination, Tooltip, review },
   name: "helpCategory",
   data() {
     return {
-      paymentTypeList:auditPaymentTypeList,
+      paymentTypeList: auditPaymentTypeList,
       organList: [],
-      statusList:auditTypeList,
+      statusList: auditTypeList,
       searchForm: {
         search: null,
-        paymentType:null,
-        status:null,
-        organId: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, // 限制显示条数
@@ -282,76 +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;
-        }
-      });
+    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
+        ...this.searchForm,
       };
       getAuditList(params).then((res) => {
         let result = res.data;
@@ -361,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);
-        }
-      });
-    },
-    getId(id, parentIds, idAndParent) {
-      idAndParent.forEach((item) => {
-        if (item.id == id) {
-          parentIds.push(id);
-          if (item.parentId != -1) {
-            this.getId(item.parentId, parentIds, idAndParent);
-          }
-        }
-      });
+    close() {
+      this.typeStatus = false;
+      this.getList()
     },
-    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;
+      }
     },
   },
 };

+ 113 - 104
src/views/resetTeaming/modals/review-detail.vue

@@ -1,140 +1,149 @@
 <template>
   <div>
-    <el-alert
-      title="申请信息"
-      :closable="false"
-      class="alert"
-      type="info">
+    <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-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 title="课程信息" :closable="false" class="alert" type="info">
     </el-alert>
     <descriptions :column="3">
-      <descriptions-item label="收费标准:">{{musicGroupPaymentCalenderCourseSettingName}}</descriptions-item>
+      <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-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}}</descriptions-item>
-      <descriptions-item label="缴费方式:">{{auditDto.paymentPattern | paymentPatternTypeFormat}}</descriptions-item>
-      <descriptions-item v-if="auditDto.payUserType !== 'SCHOOL'" label="缴费日期:">{{auditDto.startPaymentDate}} - {{auditDto.deadlinePaymentDate}}</descriptions-item>
-      <descriptions-item label="缴费有效期:">{{auditDto.paymentValidStartDate}} - {{auditDto.paymentValidEndDate}}</descriptions-item>
+      <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 title="其他" :closable="false" class="alert" type="info">
     </el-alert>
     <descriptions :column="2">
-      <descriptions-item label="是否赠送乐团网管课:">{{detail.isGiveMusicNetwork ? '是' : '否'}}</descriptions-item>
-      <descriptions-item label="备注:">{{detail.memo}}</descriptions-item>
+      <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)
+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'],
+  props: ["detail"],
   data() {
     return {
       ...initData,
-    }
+    };
   },
   computed: {
     musicGroupPaymentCalenderCourseSettingName() {
-      const active = this.musicGroupPaymentCalenderCourseSettings[0]
+      const active = this.musicGroupPaymentCalenderCourseSettings[0];
       if (active) {
-        return active.name
+        return active.name;
       }
-      return ''
-    }
+      return "";
+    },
   },
-  async mounted() {
-    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) {}
+  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;
-  //     }
-  // }
+.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>

+ 39 - 35
src/views/resetTeaming/modals/review.vue

@@ -1,60 +1,64 @@
 <template>
   <div>
-    <reviewDetail
-      :detail="detail"
-    />
-    <el-alert
-      title="审核意见"
-      :closable="false"
-      class="alert"
-      type="info">
+    <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}"
+      :autosize="{ minRows: 2, maxRows: 4 }"
       placeholder="请输入审核意见"
-      v-model="textarea2">
+      v-model="remark"
+    >
     </el-input>
     <div slot="footer" class="dialog-footer">
-      <el-button @click="$listeners.close">取 消</el-button>
-      <el-button
-        type="primary"
-        @click="submit"
-        >审核</el-button>
-      <el-button
-        type="danger"
-        @click="submit"
-        >驳回</el-button>
+      <!-- <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 Vue from "vue";
+import reviewDetail from "./review-detail";
+import { auditPass, auditRefuse } from "@/api/auditManager";
 export default {
-  props: ['detail'],
+  props: ["detail"],
   components: {
-    reviewDetail
+    reviewDetail,
   },
   data() {
     return {
-      remark: ''
-    }
+      remark: "",
+    };
   },
   methods: {
-    async submit() {
+    async submit(val) {
       if (!this.remark) {
-        return this.$message.error('请输入审核意见')
+        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;
-  }
+.dialog-footer {
+  margin-top: 20px;
+  display: block;
+  text-align: right;
+}
 </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: {},