mo 2 лет назад
Родитель
Сommit
5f6f066fe8

+ 30 - 32
src/views/categroyManager/generalSettings/overallManager.vue

@@ -22,7 +22,7 @@
             ]"
           >
             缴费状态提前:
-            <el-input v-model="form['10']" placeholder="请输入天数" >
+            <el-input v-model="form['10']" placeholder="请输入天数">
               <template slot="append">天</template>
             </el-input>
             刷新
@@ -36,7 +36,6 @@
               class="marginLR5"
               v-model="form['18']"
               placeholder="请输入链接地址"
-
             >
             </el-input>
           </el-form-item>
@@ -49,7 +48,6 @@
               class="marginLR5"
               v-model="form['19']"
               placeholder="请输入链接地址"
-
             >
             </el-input>
           </el-form-item>
@@ -62,7 +60,6 @@
               class="marginLR5"
               v-model="form['19']"
               placeholder="请输入电话"
-
             >
             </el-input>
           </el-form-item>
@@ -79,11 +76,7 @@
             ]"
           >
             乐团课结算参考总时长:
-            <el-input
-              v-model="form['23']"
-              placeholder="请输入分钟数"
-
-            >
+            <el-input v-model="form['23']" placeholder="请输入分钟数">
               <template slot="append">分钟</template>
             </el-input>
           </el-form-item>
@@ -100,11 +93,7 @@
             ]"
           >
             乐团课结算单课时参考时长:
-            <el-input
-              v-model="form['24']"
-              placeholder="请输入分钟数"
-
-            >
+            <el-input v-model="form['24']" placeholder="请输入分钟数">
               <template slot="append">分钟</template>
             </el-input>
           </el-form-item>
@@ -121,7 +110,7 @@
             ]"
           >
             退款周期:
-            <el-input v-model="form['25']" placeholder="请输入天数" >
+            <el-input v-model="form['25']" placeholder="请输入天数">
               <template slot="append">天</template>
             </el-input>
           </el-form-item>
@@ -134,7 +123,6 @@
               class="marginLR5"
               v-model="form['32']"
               placeholder="请输入地址"
-
             >
             </el-input>
           </el-form-item>
@@ -147,7 +135,6 @@
               class="marginLR5"
               v-model="form['52']"
               placeholder="请输入数据"
-
             >
             </el-input>
           </el-form-item>
@@ -160,7 +147,6 @@
               class="marginLR5"
               v-model="form['53']"
               placeholder="请输入URL"
-
             >
             </el-input>
           </el-form-item>
@@ -173,7 +159,6 @@
               class="marginLR5"
               v-model="form['54']"
               placeholder="请输入URL"
-
             >
             </el-input>
           </el-form-item>
@@ -188,7 +173,6 @@
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择截止时间"
-
             >
             </el-date-picker>
           </el-form-item>
@@ -204,7 +188,6 @@
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择截止时间"
-
             >
             </el-date-picker>
           </el-form-item>
@@ -217,7 +200,6 @@
               class="marginLR5"
               v-model="form['62']"
               placeholder="请输入URL"
-
             >
             </el-input>
           </el-form-item>
@@ -230,7 +212,6 @@
               class="marginLR5"
               v-model="form['64']"
               placeholder="请输入URL"
-
             >
             </el-input>
           </el-form-item>
@@ -245,7 +226,6 @@
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择截止时间"
-
             >
             </el-date-picker>
           </el-form-item>
@@ -296,11 +276,10 @@
           <el-form-item prop="89">
             学员端
             <el-time-picker
-            class="marginLR5"
+              class="marginLR5"
               v-model="form['89']"
               format="HH:mm"
               value-format="HH:mm"
-
               :picker-options="{
                 selectableRange: '00:00:00 - 23:59:59',
               }"
@@ -315,7 +294,6 @@
               v-model="form['205']"
               format="HH:mm"
               value-format="HH:mm"
-
               :picker-options="{
                 selectableRange: '00:00:00 - 23:59:59',
               }"
@@ -333,7 +311,6 @@
               class="marginLR5"
               v-model="form['103']"
               placeholder="请输入问卷编号"
-
             >
             </el-input>
           </el-form-item>
@@ -350,12 +327,31 @@
             ]"
           >
             乐团缴费开启后
-            <el-input v-model="form['74']" placeholder="请输入天数" >
+            <el-input v-model="form['74']" placeholder="请输入天数">
               <template slot="append">天</template>
             </el-input>
             向乐团主管发送缴费明细短信
           </el-form-item>
         </el-row>
+        <el-row>
+          <el-form-item
+            prop="240"
+            :rules="[
+              {
+                required: true,
+                message: '请输入正确的金额',
+                trigger: 'blur',
+                pattern: /^(\+)?\d+(\.\d+)?$/,
+              },
+            ]"
+          >
+          机构云教室账户余额小于
+            <el-input v-model="form['240']" placeholder="请输入金额">
+              <template slot="append">元</template>
+            </el-input>
+            时发送短信和邮件提醒
+          </el-form-item>
+        </el-row>
       </el-form>
       <!-- 列表 -->
       <!-- <el-row>
@@ -379,10 +375,12 @@
           >
         </el-col>
       </el-row> -->
-
     </div>
-    <el-button  type="primary" @click="save" class="saveBtn"
-     v-permission="'sysConfig/batchUpdate/overallManager'"
+    <el-button
+      type="primary"
+      @click="save"
+      class="saveBtn"
+      v-permission="'sysConfig/batchUpdate/overallManager'"
       >保存</el-button
     >
   </div>

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

@@ -280,6 +280,7 @@ export default {
     addVisit(row) {
       this.activeRow = row;
       // this.imageList = this.activeRow.attachments.split(",");
+      console.log(row,'addVisit')
       this.visitVisible = true;
     },
     changeTimer(val) {

+ 1 - 1
src/views/smallStudentManager/components/tableList.vue

@@ -376,7 +376,7 @@
         </el-table-column>
         <el-table-column align="center" prop="totalCourseNum" label="总课时">
           <template slot-scope="scope">
-            {{ scope.row.totalCourseNum }}节
+            {{ parseInt(scope.row.totalCourseNum+scope.row.noScheduleNum)  }}节
           </template>
         </el-table-column>
         <el-table-column align="center" prop="overCourseNum" label="已完成课时">

+ 517 - 0
src/views/studentManager/components/studentVisit.vue

@@ -0,0 +1,517 @@
+<template>
+  <div>
+    <!-- class="m-container" -->
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        @submit="search"
+        @reset="onReSet"
+        :model="searchForm"
+        save-key="studentManager-returnVisitList"
+        ref="searchForm"
+      >
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.visiterType"
+            placeholder="请选择角色"
+            clearable
+            filterable
+          >
+            <el-option value="TEACHER" label="指导老师"></el-option>
+            <el-option value="EDU_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-select
+            v-model.trim="searchForm.probStatus"
+            placeholder="问题状态"
+            clearable
+            filterable
+          >
+            <el-option :value="0" label="待跟进"></el-option>
+            <el-option :value="1" label="已解决"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item>
+          <el-date-picker
+            v-model.trim="searchForm.timer"
+            style="width: 420px"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="回访开始日期"
+            end-placeholder="回访结束日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+          >
+          </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-button
+            v-if="permission('export/studentVisitRecord')"
+            type="primary"
+            @click="onExport"
+            >导出</el-button
+          >
+        </el-form-item>
+      </save-form>
+      <el-button type="primary" style="margin-bottom:20px" @click="visitVisible= true">新增回访</el-button>
+      <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">
+              <copy-text>{{ scope.row.teacherName }}</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="visiterType" label="角色">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.visiterType | visiterType }}
+              </div>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column align="center" prop="studentId" label="学生ID">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.studentId }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="studentName" label="学生姓名">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.studentName }}</copy-text>
+            </template>
+          </el-table-column> -->
+
+          <el-table-column align="center" prop="type" label="回访类型">
+          </el-table-column>
+          <el-table-column align="center" prop="purpose" label="回访目的">
+          </el-table-column>
+          <el-table-column align="center" prop="probStatus" label="问题状态">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.probStatus ? "已解决" : "待跟进" }}
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop="name" label="回访图片">
+            <template slot-scope="scope">
+              <div class="flexBox">
+                <el-image
+                  v-if="scope.row.attachments"
+                  style="width: 60px; height: 60px"
+                  fit="cover"
+                  :src="scope.row.attachments.split(',')[0]"
+                  :previewSrcList="scope.row.attachments.split(',')"
+                >
+                </el-image>
+                <p v-if="scope.row.attachments.split(',').length - 1 > 0">
+                  +{{ scope.row.attachments.split(",").length - 1 }}
+                </p>
+              </div>
+            </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="lookDetail(scope.row)"
+                  >查看</el-button
+                >
+                <el-button
+                  type="text"
+                  v-if="
+                    !scope.row.probStatus &&
+                    permission('visit/updateProbStatus')
+                  "
+                  @click="updateState(scope.row)"
+                  >状态修改</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          save-key="studentManager-returnVisitList"
+          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="740px"
+      v-if="detailVisible"
+      :visible.sync="detailVisible"
+    >
+      <div>
+        <descriptions :column="2" v-if="activeRow" class="returnDialog">
+          <descriptions-item label="老师姓名:">{{
+            activeRow.teacherName
+          }}</descriptions-item>
+          <descriptions-item label="所属分部:">{{
+            activeRow.organName
+          }}</descriptions-item>
+          <descriptions-item label="角色:">{{
+            activeRow.visiterType | visiterType
+          }}</descriptions-item>
+          <descriptions-item label="学生姓名:">{{
+            activeRow.studentName
+          }}</descriptions-item>
+          <descriptions-item label="回访类型:">{{
+            activeRow.type
+          }}</descriptions-item>
+          <descriptions-item label="回访目的:">{{
+            activeRow.purpose
+          }}</descriptions-item>
+          <descriptions-item
+            label="家长反馈:"
+            v-if="activeRow.type == '小课回访'"
+            >{{
+              activeRow.feedbackType | feedbackTypeFilter
+            }}</descriptions-item
+          >
+          <descriptions-item
+            label="反馈详情:"
+            v-if="
+              (activeRow.feedbackType == 'THINKING' ||
+                activeRow.feedbackType == 'LOST') &&
+              activeRow.type == '小课回访'
+            "
+            >{{
+              activeRow.feedbackTypeDesc | feedbackTypeDescFilter
+            }}</descriptions-item
+          >
+          <descriptions-item label="问题状态:">{{
+            activeRow.probStatus ? "已解决" : "待跟进"
+          }}</descriptions-item>
+          <descriptions-item label="回访情况:" :span="6">{{
+            activeRow.overview
+          }}</descriptions-item>
+          <descriptions-item
+            :label="activeRow.type == '小课回访' ? '原因' : '家长反馈'"
+            :span="6"
+            >{{ activeRow.feedback }}</descriptions-item
+          >
+          <descriptions-item label="回访图片" :span="6">
+            <div class="list" v-if="imageList.length > 0">
+              <div v-for="item in imageList" :key="item.url" class="item">
+                <el-image
+                  v-if="item"
+                  :src="item"
+                  :preview-src-list="imageList.map((item) => item)"
+                  class="img"
+                >
+                </el-image>
+              </div>
+            </div>
+            <empty v-else />
+          </descriptions-item>
+        </descriptions>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="新增回访"
+      width="760px"
+      :visible.sync="visitVisible"
+      append-to-body
+    >
+      <visit
+        v-if="visitVisible"
+        :detail="{
+          studentName:$route.query.username,
+          studentId: $route.query.userId,
+        }"
+        :username="$route.query.username"
+        @close="visitVisible = false"
+        @submited="getList"
+        :isMainGo="false"
+        :useVisitType="false"
+      />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { visitChiose1 } from "@/utils/searchArray";
+import { Export } from "@/utils/downLoadFile";
+import pagination from "@/components/Pagination/index";
+import { getEmployeeOrgan } from "@/api/buildTeam";
+import {
+  getVisitList,
+  updateProbStatus,
+} from "@/views/returnVisitManager/api.js";
+import cleanDeep from "clean-deep";
+import { getTimes } from "@/utils";
+import { resetQuery } from "@/utils/utils";
+import { permission } from "@/utils/directivePage";
+import visit from "@/views/withdrawal-application/modals/visit";
+import qs from "qs";
+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( )
+      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,
+        studentId: this.$route.query.userId,
+      };
+      getVisitList(cleanDeep(params)).then((res) => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
+        }
+      });
+    },
+    lookDetail(row) {
+      this.activeRow = row;
+      this.imageList = this.activeRow.attachments.split(",");
+      this.detailVisible = true;
+    },
+    updateState(row) {
+      this.$confirm("是否将问题状态更变为'已解决'", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then((res) => {
+        updateProbStatus({ id: row.id, probStatus: 1 }).then((res) => {
+          this.$message.success("修改成功");
+          this.getList();
+        });
+      });
+    },
+    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;
+      }
+    },
+    permission(str) {
+      return permission(str);
+    },
+    onExport() {
+      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,
+      };
+      Export(
+        this,
+        {
+          url: "/api-web/export/studentVisitRecord",
+          params: qs.stringify(
+            cleanDeep({
+              ...params,
+            })
+          ),
+          fileName: `学员回访导出.xls`,
+          method: "post",
+        },
+        "确定导出学员回访"
+      );
+    },
+  },
+  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>

+ 17 - 4
src/views/studentManager/index.vue

@@ -82,7 +82,7 @@
         >
           <studentCashout v-if="activeIndex == 8" />
         </el-tab-pane>
-          <el-tab-pane
+        <el-tab-pane
           label="乐器列表"
           lazy
           v-if="permissionList.studentLebao"
@@ -90,6 +90,16 @@
         >
           <studentLebao v-if="activeIndex == 10" />
         </el-tab-pane>
+
+        <el-tab-pane
+          label="回访记录"
+          lazy
+          v-if="permissionList.studentVisit"
+          name="11"
+        >
+          <studentVisit v-if="activeIndex == 11" />
+        </el-tab-pane>
+        <!-- studentVisit -->
       </tab-router>
     </div>
   </div>
@@ -104,7 +114,8 @@ import studentOutList from "./components/studentOutList.vue";
 import studentOrder from "./components/studentOrder.vue";
 import studentCashout from "./components/studentCashout.vue";
 import studentNetwork from "./components/studentNetwork.vue";
-import studentLebao from "./components/studentLebao"
+import studentLebao from "./components/studentLebao";
+import studentVisit from "./components/studentVisit";
 import { permission } from "@/utils/directivePage";
 export default {
   components: {
@@ -117,7 +128,8 @@ export default {
     studentCashout,
     studentOutList,
     studentNetwork,
-    studentLebao
+    studentLebao,
+    studentVisit,
   },
   name: "studentDetail",
   data() {
@@ -134,7 +146,8 @@ export default {
         studentCashout: permission("/studentDetail/studentCashout"),
         studentOutList: permission("/studentDetail/studentOutList"), //
         studentNetwork: permission("/studentDetail/studentNetwork"),
-        studentLebao:permission("/studentDetail/studentLebao"),
+        studentLebao: permission("/studentDetail/studentLebao"),
+        studentVisit:permission("visit/queryPage/student"),
       },
       studentName: "",
     };