Browse Source

回访记录整合

1
mo 4 years ago
parent
commit
78b681d18e

+ 5 - 5
src/views/teamBuild/forecastName.vue

@@ -214,7 +214,7 @@
             :close-on-click-modal="false"
             :close-on-click-modal="false"
             :visible.sync="visitVisible"
             :visible.sync="visitVisible"
         >
         >
-            <visit-model v-if="visitVisible" @close="visitVisible = false" :visitDetail="visitDetail" />
+            <visit-model v-if="visitVisible" @close="visitVisible = false" :detail="visitDetail" @submited="getList"/>
         </el-dialog>
         </el-dialog>
     </div>
     </div>
 </template>
 </template>
@@ -224,7 +224,7 @@ import pagination from "@/components/Pagination/index";
 import qrCode from '@/components/QrCode/index';
 import qrCode from '@/components/QrCode/index';
 import { permission } from "@/utils/directivePage";
 import { permission } from "@/utils/directivePage";
 import { vaildStudentUrl } from '@/utils/validate'
 import { vaildStudentUrl } from '@/utils/validate'
-import visitModel from './modals/visit'
+import visitModel from '@/views/withdrawal-application/modals/visit'
 import { queryPreApplyList, finishPreApply, sendParentMeetingNotice } from './api'
 import { queryPreApplyList, finishPreApply, sendParentMeetingNotice } from './api'
 export default {
 export default {
     name: 'forecastName',
     name: 'forecastName',
@@ -309,7 +309,7 @@ export default {
                         path: '/business/teamDetail'
                         path: '/business/teamDetail'
                     })
                     })
                 })
                 })
-                
+
             } catch(error) {}
             } catch(error) {}
         },
         },
         addVisited(rows) {
         addVisited(rows) {
@@ -319,12 +319,12 @@ export default {
                 musicGroupId: rows.musicGroupId,
                 musicGroupId: rows.musicGroupId,
                 overview: "",
                 overview: "",
                 purpose: "",
                 purpose: "",
-                studentId: rows.userId,
+                userId: rows.userId,
                 type: "",
                 type: "",
                 visitTime: "",
                 visitTime: "",
                 visitType: "",
                 visitType: "",
                 feedback: "",
                 feedback: "",
-                studentName: rows.userName,
+                realName: rows.userName,
             }
             }
             // this.visitDetail = rows
             // this.visitDetail = rows
         },
         },

+ 21 - 11
src/views/teamBuild/signupList.vue

@@ -569,12 +569,18 @@
     <!-- 回访记录 -->
     <!-- 回访记录 -->
     <el-dialog
     <el-dialog
       title="新增回访"
       title="新增回访"
-      width="600px"
+      width="500px"
       destroy-on-close
       destroy-on-close
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       :visible.sync="visitVisiable"
       :visible.sync="visitVisiable"
     >
     >
-      <el-form
+      <visit
+        v-if="visitVisiable && detail"
+        :detail="detail"
+        @close="visitVisiable = false"
+        @submited="getList"
+      />
+      <!-- <el-form
         :model="visitForm"
         :model="visitForm"
         label-width="120px"
         label-width="120px"
         label-position="right"
         label-position="right"
@@ -631,7 +637,7 @@
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="visitVisiable = false">取 消</el-button>
         <el-button @click="visitVisiable = false">取 消</el-button>
         <el-button type="primary" @click="submitAddVisit">确 定</el-button>
         <el-button type="primary" @click="submitAddVisit">确 定</el-button>
-      </span>
+      </span> -->
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       title="更改声部"
       title="更改声部"
@@ -681,6 +687,7 @@ import qs from "qs";
 import { permission } from "@/utils/directivePage";
 import { permission } from "@/utils/directivePage";
 import cleanDeep from "clean-deep";
 import cleanDeep from "clean-deep";
 import changeVoice from "./modals/change-voice";
 import changeVoice from "./modals/change-voice";
+import visit from '@/views/withdrawal-application/modals/visit'
 export default {
 export default {
   name: "signupList",
   name: "signupList",
   components: {
   components: {
@@ -688,6 +695,7 @@ export default {
     changeVoice,
     changeVoice,
     mergeMusic,
     mergeMusic,
     forecastList,
     forecastList,
+    visit
   },
   },
   data() {
   data() {
     return {
     return {
@@ -809,6 +817,7 @@ export default {
       },
       },
       isPay: false,
       isPay: false,
       applyDates: this.applyDate(),
       applyDates: this.applyDate(),
+      detail:null
     };
     };
   },
   },
   created() {
   created() {
@@ -1337,9 +1346,10 @@ export default {
       // row.typeVisible = false;
       // row.typeVisible = false;
     },
     },
     addVisit(row) {
     addVisit(row) {
-      this.visitForm.studentName = row.studentName;
-      this.visitForm.musicGroupId = this.teamid;
-      this.visitForm.studentId = row.studentId;
+      // this.visitForm.studentName = row.studentName;
+      // this.visitForm.musicGroupId = this.teamid;
+      // this.visitForm.studentId = row.studentId;
+      this.detail = row
       this.visitVisiable = true;
       this.visitVisiable = true;
     },
     },
     openChangeVoice(row) {
     openChangeVoice(row) {
@@ -1473,11 +1483,11 @@ export default {
         this.$refs["quitForm"].resetFields();
         this.$refs["quitForm"].resetFields();
       }
       }
     },
     },
-    visitVisiable(val) {
-      if (!val) {
-        this.$refs["visitForm"].resetFields();
-      }
-    },
+    // visitVisiable(val) {
+    //   if (!val) {
+    //     this.$refs["visitForm"].resetFields();
+    //   }
+    // },
   },
   },
 };
 };
 </script>
 </script>

+ 24 - 14
src/views/teamDetail/components/studentList.vue

@@ -585,12 +585,18 @@
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       title="新增回访"
       title="新增回访"
-      width="600px"
+      width="500px"
       destroy-on-close
       destroy-on-close
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       :visible.sync="visitVisiable"
       :visible.sync="visitVisiable"
     >
     >
-      <el-form
+       <visit
+        v-if="visitVisiable && detail"
+        :detail="detail"
+        @close="visitVisiable = false"
+        @submited="getList"
+      />
+      <!-- <el-form
         :model="visitForm"
         :model="visitForm"
         label-width="120px"
         label-width="120px"
         label-position="right"
         label-position="right"
@@ -643,11 +649,11 @@
             show-word-limit
             show-word-limit
           ></el-input>
           ></el-input>
         </el-form-item>
         </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
+      </el-form> -->
+      <!-- <span slot="footer" class="dialog-footer">
         <el-button @click="visitVisiable = false">取 消</el-button>
         <el-button @click="visitVisiable = false">取 消</el-button>
         <el-button type="primary" @click="submitAddVisit">确 定</el-button>
         <el-button type="primary" @click="submitAddVisit">确 定</el-button>
-      </span>
+      </span> -->
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
       title="选择班级"
       title="选择班级"
@@ -719,10 +725,12 @@ import TimesView from './modals/course-time-detail'
 import paymentCycle from '../../resetTeaming/modals/payment-cycle'
 import paymentCycle from '../../resetTeaming/modals/payment-cycle'
 import paymentList from './modals/payment-list'
 import paymentList from './modals/payment-list'
 import Tooltip from '@/components/Tooltip/index'
 import Tooltip from '@/components/Tooltip/index'
+import visit from '@/views/withdrawal-application/modals/visit'
 export default {
 export default {
   name: "tstudentList",
   name: "tstudentList",
   data() {
   data() {
     return {
     return {
+      detail:null,
       teamid: "",
       teamid: "",
       paymentDetailVisible: false,
       paymentDetailVisible: false,
       paymentDetail: {},
       paymentDetail: {},
@@ -893,7 +901,8 @@ export default {
     createUserPay,
     createUserPay,
     Tooltip,
     Tooltip,
     'times-view': TimesView,
     'times-view': TimesView,
-    paymentList
+    paymentList,
+    visit
   },
   },
   created() {
   created() {
     // 判断是否带缓存参数
     // 判断是否带缓存参数
@@ -1474,9 +1483,10 @@ export default {
     },
     },
     addVisit(row) {
     addVisit(row) {
       console.log(row);
       console.log(row);
-      this.visitForm.studentName = row.realName;
-      this.visitForm.musicGroupId = this.teamid;
-      this.visitForm.studentId = row.userId;
+      this.detail = row
+      // this.visitForm.studentName = row.realName;
+      // this.visitForm.musicGroupId = this.teamid;
+      // this.visitForm.studentId = row.userId;
       this.visitVisiable = true;
       this.visitVisiable = true;
     },
     },
     handleChange(val) {
     handleChange(val) {
@@ -1519,11 +1529,11 @@ export default {
         this.$refs["quitForm"].resetFields();
         this.$refs["quitForm"].resetFields();
       }
       }
     },
     },
-    visitVisiable(val) {
-      if (!val) {
-        this.$refs["visitForm"].resetFields();
-      }
-    },
+    // visitVisiable(val) {
+    //   if (!val) {
+    //     this.$refs["visitForm"].resetFields();
+    //   }
+    // },
   },
   },
 };
 };
 </script>
 </script>

+ 6 - 2
src/views/withdrawal-application/modals/visit.vue

@@ -90,11 +90,15 @@ export default {
   },
   },
   computed: {
   computed: {
     userName() {
     userName() {
-      return this.username || this.detail.user?.username
+      return this.username || this.detail.user?.username || this.detail.realName || this.detail.userName || this.detail.studentName
+    },
+    studentId(){
+      return this.detail.userId || this.detail.studentId
     }
     }
   },
   },
   methods: {
   methods: {
     submitAddVisit() {
     submitAddVisit() {
+
       this.$refs.visitForm.validate((res) => {
       this.$refs.visitForm.validate((res) => {
         if (res) {
         if (res) {
           const { visitType, ...rest } = this.visitForm
           const { visitType, ...rest } = this.visitForm
@@ -103,7 +107,7 @@ export default {
             objectId: this.detail.id,
             objectId: this.detail.id,
             studentName: this.userName,
             studentName: this.userName,
             musicGroupId: this.detail.musicGroupId,
             musicGroupId: this.detail.musicGroupId,
-            studentId: this.detail.userId,
+            studentId: this.studentId,
             type: visitType[0],
             type: visitType[0],
             purpose: visitType[1],
             purpose: visitType[1],
           }
           }