Просмотр исходного кода

Merge remote-tracking branch 'origin/fix-shenhe'

lex-xin 4 лет назад
Родитель
Сommit
0616778407

+ 82 - 0
src/views/auditList/audit.vue

@@ -0,0 +1,82 @@
+<template>
+  <div>
+    <el-alert style="margin: 20px 0;"
+              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)"
+                 v-if="permission('musicGroupPaymentCalender/auditPass')">审核通过</el-button>
+      <el-button type="danger"
+                 @click="submit(0)"
+                 v-if="permission('musicGroupPaymentCalender/auditRefuse')">驳回</el-button>
+      <el-button @click="$emit('close')">关 闭</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { permission } from '@/utils/directivePage'
+import { auditPass, auditRefuse } from "@/api/auditManager";
+export default {
+  props: ["selList"],
+  data () {
+    return {
+      remark: "",
+    };
+  },
+  methods: {
+    async submit (val) {
+      if (!this.remark) {
+        return this.$message.error("请输入审核意见");
+      }
+      if (val) {
+        try {
+          await this.$confirm('是否确认批量审核通过', '提示', {
+            type: 'warning'
+          })
+          await auditPass({ batchNo: this.selList.map(item => item.batchNo).join(','), auditMemo: this.remark }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success('批量审核通过')
+              this.$emit('close')
+              this.$emit('submited')
+            }
+          });
+        } catch (error) {}
+      } else {
+        try {
+          await this.$confirm('是否确认批量驳回', '提示', {
+            type: 'warning'
+          })
+          await auditRefuse({ batchNo: this.selList.map(item => item.batchNo).join(','), auditMemo: this.remark }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success('批量驳回成功')
+              this.$emit('close')
+              this.$emit('submited')
+            }
+          });
+        } catch (error) {}
+      }
+    },
+    permission (str) {
+      return permission(str)
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+.dialog-footer {
+  margin-top: 20px;
+  display: block;
+  text-align: right;
+}
+</style>

+ 27 - 2
src/views/auditList/index.vue

@@ -72,14 +72,21 @@
         <el-form-item>
           <el-button @click="search" type="primary">搜索</el-button>
           <el-button @click="reset" type="danger">重置</el-button>
+          <el-button
+              v-permission="'musicGroupPaymentCalender/auditPass'"
+             @click="typesStatus = true"
+             :disabled='!selList.length>0'
+              type="primary"
+              >批量审核</el-button>
         </el-form-item>
       </save-form>
       <div class="tableWrap">
         <el-table
           :data="tableList"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          @selection-change="handleSelectionChange"
         >
-          <!-- <el-table-column type="selection" width="55"></el-table-column> -->
+          <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column align="center" prop="organName" label="分部名称">
             <template slot-scope="scope">
               <copy-text>{{ scope.row.organName }}</copy-text>
@@ -233,11 +240,20 @@
     >
       <review :detail="detail" @close="close" />
     </el-dialog>
+    <el-dialog
+      title="批量审核"
+      width="700px"
+      :visible.sync="typesStatus"
+      destroy-on-close
+    >
+      <audit :selList="selList" @close="typesStatus = false" @submited="submited" />
+    </el-dialog>
   </div>
 </template>
 <script>
 import pagination from "@/components/Pagination/index";
 import review from "@/views/resetTeaming/modals/review.vue";
+import audit from "./audit.vue";
 // import store from '@/store'
 import { getAuditList, getAuditListDetail } from "@/api/auditManager";
 import { getEmployeeOrgan } from "@/api/buildTeam";
@@ -251,10 +267,12 @@ const initSearch = {
   organId: null,
 };
 export default {
-  components: { pagination, Tooltip, review },
+  components: { pagination, Tooltip, review, audit },
   name: "helpCategory",
   data() {
     return {
+      typesStatus: false,
+      selList: [],
       paymentTypeList: auditPaymentTypeList,
       organList: [],
       statusList: auditTypeList,
@@ -287,6 +305,9 @@ export default {
       this.searchForm = { ...initSearch };
       this.search();
     },
+    handleSelectionChange(arr){
+      this.selList = arr;
+    },
     getList() {
       let params = {
         page: this.pageInfo.page,
@@ -312,6 +333,10 @@ export default {
       };
       this.typeStatus = true;
     },
+    submited() {
+      this.pageInfo.page = 1
+      this.getList()
+    },
     close() {
       this.typeStatus = false;
       this.getList();

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

@@ -1,5 +1,20 @@
 <template>
   <div>
+    <el-alert title="学员信息"
+      :closable="false"
+      class="alert"
+      type="info"
+      v-if="musicGroupPaymentCalenders[0].paymentType === 'ADD_STUDENT'"
+    >
+    </el-alert>
+    <descriptions :column="2" v-if="musicGroupPaymentCalenders[0].paymentType === 'ADD_STUDENT'">
+      <descriptions-item label="学员姓名:">{{
+        username
+      }}</descriptions-item>
+      <descriptions-item label="手机号码:">{{
+        phone
+      }}</descriptions-item>
+    </descriptions>
     <el-alert title="申请信息"
               :closable="false"
               class="alert"
@@ -24,6 +39,7 @@
       <descriptions-item label="订单类型:">{{
         auditDto.payUserType | payUserTypeFormat
       }}</descriptions-item>
+      <descriptions-item :span="3" label="备注:">{{ musicGroupPaymentCalenders[0] ? musicGroupPaymentCalenders[0].memo : null }}</descriptions-item>
     </descriptions>
     <el-alert title="课程信息"
               :closable="false"
@@ -188,6 +204,8 @@ const initData = {
   simpleUserDto: [],
   musicGroupPaymentCalenders: [],
   studentNum: 0,
+  phone: '',
+  username: '',
 };
 export default {
   props: ["detail"],