فهرست منبع

回访列表

1
mo 2 سال پیش
والد
کامیت
5b892030cd

+ 1 - 1
src/router/index.js

@@ -352,7 +352,7 @@ export const asyncRoutes = {
   adapayOperation: () => import('@/views/adapayAccount/form'),
   // 日历课表
   calendarList: () => import('@/views/teacherManager/teacherDetail/components/calendarList'),
-  returnVisitList: () => import('@/views/returnVisitManager/returnVisitList'),
+  returnVisitList: () => import('@/views/returnVisitManager/index'),
   // 经营报表
   businessStatement: () => import('@/views/businessManager/orderManager/businessStatement'),
   //经营详情

+ 5 - 6
src/views/returnVisitManager/returnVisitList.vue → src/views/returnVisitManager/components/returnVisitList.vue

@@ -1,15 +1,13 @@
 <template>
-  <div class="m-container">
-    <h2>
-      <div class="squrt"></div>
-      回访记录
-    </h2>
+  <div >
+    <!-- class="m-container" -->
     <div class="m-core">
       <save-form
         :inline="true"
         @submit="search"
         @reset="onReSet"
         :model="searchForm"
+        save-key="returnVisitManager-returnVisitList"
         ref="searchForm"
       >
         <!-- search(); -->
@@ -157,6 +155,7 @@
           </el-table-column>
         </el-table>
         <pagination
+        save-key="returnVisitManager-returnVisitList"
           sync
           :total.sync="rules.total"
           :page.sync="rules.page"
@@ -221,7 +220,7 @@
 import { visitChiose1 } from "@/utils/searchArray";
 import pagination from "@/components/Pagination/index";
 import { getEmployeeOrgan } from "@/api/buildTeam";
-import { getVisitList } from "./api.js";
+import { getVisitList } from "../api.js";
 import cleanDeep from "clean-deep";
 import { getTimes } from "@/utils";
 import { resetQuery } from "@/utils/utils";

+ 360 - 0
src/views/returnVisitManager/components/waitVisit.vue

@@ -0,0 +1,360 @@
+<template>
+  <div>
+    <!-- class="m-container" -->
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        @submit="search"
+        @reset="onReSet"
+        :model="searchForm"
+        save-key="returnVisitManager-waitVisit"
+        ref="searchForm"
+      >
+        <!-- search(); -->
+        <el-form-item>
+          <el-input
+            placeholder="学员姓名/编号/手机号"
+            v-model.trim="searchForm.search"
+            @keyup.enter.native="
+              (e) => {
+                e.target.blur();
+                $refs.searchForm.save();
+              }
+            "
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.organId"
+            placeholder="请选择分部"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.visiterType"
+            placeholder="回访状态"
+            clearable
+            filterable
+          >
+          <el-option value="EDU_TEACHER" label="已回访"></el-option>
+            <el-option value="TEACHER" label="未回访"></el-option>
+
+          </el-select>
+        </el-form-item>
+        <!-- @change="handleChange" -->
+        <!-- <el-form-item>
+          <el-cascader
+            expand-trigger="hover"
+            clearable
+            placeholder="请选择回访类型"
+            :options="visitChiose"
+            v-model="searchForm.typeList"
+          >
+          </el-cascader>
+        </el-form-item> -->
+        <el-form-item>
+          <el-date-picker
+            v-model.trim="searchForm.timer"
+
+            type="month"
+            placeholder="回访周期"
+
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="danger" native-type="submit">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          :data="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        >
+          <el-table-column align="center" prop="teacherName" label="学员信息">
+            <template slot-scope="scope">
+              <div @click="gotoStudent(scope.row.studentId)">
+                <p>
+                  <el-button type="text">{{ scope.row.studentName }}<br>  ({{ scope.row.studentId }})</el-button>
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="phone" label="手机号">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.phone }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="organName" label="分部">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.organName }}</copy-text>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop="type" label="回访周期">
+          </el-table-column>
+          <el-table-column align="center" prop="isVisit" label="回访状态">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.isVisit?'已回访':'未回访' }}</copy-text>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop="visitTime" label="回访时间">
+            <template slot-scope="scope">
+              <div>
+                {{
+                  scope.row.visitTime ? scope.row.visitTime.split(" ")[0] : "--"
+                }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="masterTeacherName" label="操作">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text" @click="addVisit(scope.row)"
+                  >新增回访</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          save-key="returnVisitManager-waitVisit"
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+    <el-dialog
+      title="新增回访"
+      width="760px"
+      :visible.sync="visitVisible"
+      append-to-body
+    >
+      <visit
+        v-if="visitVisible && activeRow"
+        :detail="activeRow"
+        :username="activeRow.username"
+        @close="visitVisible = false"
+        @submited="getList"
+        :isMainGo="true"
+      />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { visitChiose1 } from "@/utils/searchArray";
+import pagination from "@/components/Pagination/index";
+import { getEmployeeOrgan } from "@/api/buildTeam";
+import { getVisitList } from "../api.js";
+import cleanDeep from "clean-deep";
+import { getTimes } from "@/utils";
+import { resetQuery } from "@/utils/utils";
+import visit from "@/views/withdrawal-application/modals/visit";
+export default {
+  components: { pagination, visit },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+        organId: "",
+        visiterType: "",
+        typeList: [],
+        timer: [],
+      },
+
+      visitChiose: visitChiose1,
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      tableList: [],
+      imageList: [],
+      detailVisible: false,
+      activeRow: null,
+      visitVisible: false,
+    };
+  },
+  mounted() {
+    // getEmployeeOrgan().then((res) => {
+    //   if (res.code == 200) {
+    //     this.organList = res.data;
+    //   }
+    // });
+    this.$store.dispatch("setBranchs");
+
+    if (this.$route.query) {
+      // 兼容老功能
+      if (this.$route.query.search) {
+        this.searchForm.search = this.$route.query.teacher;
+        this.searchForm.search = this.$route.query.search;
+      }
+
+      this.searchForm.timer = this.$route.query.timer;
+    }
+    if (this.$route.query.typeList && this.$route.query.typeList.length > 0) {
+      this.searchForm.typeList = this.$route.query.typeList;
+    }
+    this.getList();
+    if (this.$route.query.search || this.$route.query.timer) {
+      // console.log( )
+      console.log("进来了");
+      resetQuery(this, { timer: undefined, search: undefined });
+    }
+  },
+  // activated() {
+  //   this.getList();
+  // },
+  methods: {
+    handleChange(val) {
+      this.searchForm.type = val[0];
+      this.searchForm.purpose = val[1];
+    },
+    search() {
+      // this.$router.replace({query:{...this.$route.query,timer:undefined,teacher:undefined}})
+
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.type = [];
+      this.timer = [];
+      this.searchForm = {
+        search: "",
+        organId: "",
+        visiterType: "",
+        type: "",
+        purpose: "",
+        typeList: [],
+        timer: [],
+      };
+      this.search();
+    },
+    getList() {
+      // cleanDeep
+      let { timer, typeList, ...rest } = this.searchForm;
+      let type,
+        purpose = null;
+      if (typeList.length > 0) {
+        type = typeList[0];
+        purpose = typeList[1];
+      }
+
+      let params = {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        ...getTimes(timer, ["startTime", "endTime"]),
+        type,
+        purpose,
+      };
+      getVisitList(cleanDeep(params)).then((res) => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
+        }
+      });
+    },
+    addVisit(row) {
+      this.activeRow = row;
+      // this.imageList = this.activeRow.attachments.split(",");
+      this.visitVisible = true;
+    },
+    changeTimer(val) {
+      if (val && val.length > 0) {
+        this.searchForm.startTime = this.timer[0];
+        this.searchForm.endTime = this.timer[1];
+      } else {
+        this.searchForm.startTime = null;
+        this.searchForm.endTime = null;
+      }
+    },
+    gotoStudent(search) {
+      this.$router.push({
+        name: "studentList",
+        params: { search: search },
+      });
+    },
+  },
+  watch: {
+    detailVisible(val) {
+      if (!val) {
+        this.activeRow = null;
+        this.imageList = [];
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.msg {
+  min-width: 120px;
+}
+.label {
+  width: 520px;
+}
+::v-deep .description-title {
+  margin-bottom: 0;
+}
+.returnDialog {
+  ::v-deep .description-view {
+    .description-content {
+      white-space: normal !important;
+    }
+  }
+}
+.flexBox {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
+.img-container {
+  margin: 10px auto;
+}
+.item {
+  width: 150px;
+  margin-top: 10px;
+  margin-right: 10px;
+  display: inline-block;
+  position: relative;
+}
+.img {
+  width: 150px;
+  height: 150px;
+}
+.ctrl-bar {
+  background-color: rgba(0, 0, 0, 0.45);
+  height: 30px;
+  position: absolute;
+  top: 0;
+  width: 100%;
+  z-index: 1;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  padding: 0 15px;
+  i {
+    color: #fff;
+    cursor: pointer;
+  }
+}
+</style>

+ 43 - 0
src/views/returnVisitManager/index.vue

@@ -0,0 +1,43 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      学员回访
+    </h2>
+    <div class="m-core">
+      <tab-router
+        v-model.trim="activeIndex"
+        type="card"
+        @tab-click="handleClick"
+      >
+        <el-tab-pane label="待回访列表" lazy name="1"  v-permission="'smallStudentManager/vipClass'">
+          <waitVisit v-if="activeIndex === '1'" />
+        </el-tab-pane>
+        <el-tab-pane label="回访记录" lazy name="2" v-permission="'smallStudentManager/theoryClass'">
+          <returnVisitList  v-if="activeIndex === '2'" />
+        </el-tab-pane>
+      </tab-router>
+    </div>
+  </div>
+</template>
+
+<script>
+  import returnVisitList from './components/returnVisitList.vue'
+  import waitVisit from './components/waitVisit.vue'
+export default {
+  components: { returnVisitList,waitVisit },
+  data() {
+    return {
+      activeIndex: "1",
+    };
+  },
+  methods: {
+    handleClick(evt) {
+      // this.changeHash(evt.name);
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>