|
@@ -247,6 +247,9 @@
|
|
|
<el-button type="text"
|
|
|
v-if="permission('musicGroupQuit/directQuitMusicGroup')"
|
|
|
@click="quieTeamMask(scope.row)">退团</el-button>
|
|
|
+ <el-button type="text"
|
|
|
+ v-if="permission('musicGroupQuit/directQuitMusicGroup')"
|
|
|
+ @click="addVisit(scope.row)">新增回访</el-button>
|
|
|
|
|
|
<!-- <el-button type="text" @click="lookClass(scope.row)">查看班级</el-button>
|
|
|
<el-button type="text" v-if="!scope.row.isLock" @click="lockStudent(scope.row)">锁定</el-button>
|
|
@@ -635,6 +638,63 @@
|
|
|
@click="submitPay">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="新增回访"
|
|
|
+ width="600px"
|
|
|
+ destroy-on-close
|
|
|
+ :close-on-click-modal='false'
|
|
|
+ :visible.sync="visitVisiable">
|
|
|
+ <el-form :model="visitForm"
|
|
|
+ ref='visitForm'
|
|
|
+ :rules="visitRules">
|
|
|
+ <el-form-item label="回访类型"
|
|
|
+ prop='visitType'>
|
|
|
+ <el-cascader expand-trigger="hover"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择回访类型"
|
|
|
+ :options="visitChiose"
|
|
|
+ @change="handleChange"
|
|
|
+ style="width:220px!important;"
|
|
|
+ v-model="visitForm.visitType">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="回访日期"
|
|
|
+ prop='visitTime'>
|
|
|
+ <el-date-picker v-model.trim="visitForm.visitTime"
|
|
|
+ align="right"
|
|
|
+ style="width:220px!important;"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择日期"
|
|
|
+ :picker-options="{
|
|
|
+ firstDayOfWeek:1
|
|
|
+ }"
|
|
|
+ value-format="yyyy-MM-dd"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学员情况"
|
|
|
+ prop="overview">
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-model="visitForm.overview"
|
|
|
+ style="width:80%!important;"
|
|
|
+ :rows="3"
|
|
|
+ maxlength="40"
|
|
|
+ show-word-limit></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="家长反馈"
|
|
|
+ prop='feedback'>
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-model="visitForm.feedback"
|
|
|
+ style="width:80%!important;"
|
|
|
+ :rows="3"
|
|
|
+ maxlength="40"
|
|
|
+ show-word-limit></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer"
|
|
|
+ class="dialog-footer">
|
|
|
+ <el-button @click="visitVisiable = false">取 消</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ @click="submitAddVisit">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -656,12 +716,15 @@ import {
|
|
|
getStudentClass,
|
|
|
getStudentInfoByPhone
|
|
|
} from "@/api/studentManager";
|
|
|
+import { visitChiose } from '@/utils/searchArray'
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import { vaildStudentUrl } from "@/utils/validate";
|
|
|
import QRCode from "qrcodejs2";
|
|
|
import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { permission } from "@/utils/directivePage";
|
|
|
+import { addVisit } from "@/views/returnVisitManager/api.js"
|
|
|
+import cleanDeep from 'clean-deep'
|
|
|
export default {
|
|
|
name: "tstudentList",
|
|
|
data () {
|
|
@@ -789,7 +852,27 @@ export default {
|
|
|
payMoney: "",
|
|
|
payMonth: []
|
|
|
},
|
|
|
- kitStatus: false // 乐器提供方式
|
|
|
+ kitStatus: false, // 乐器提供方式
|
|
|
+ // 新增回访记录弹窗
|
|
|
+ visitVisiable: false,
|
|
|
+ visitForm: {
|
|
|
+ musicGroupId: '',
|
|
|
+ overview: '',
|
|
|
+ purpose: '',
|
|
|
+ studentId: '',
|
|
|
+ type: '',
|
|
|
+ visitTime: '',
|
|
|
+ visitType: '',
|
|
|
+ feedback: ''
|
|
|
+ },
|
|
|
+
|
|
|
+ visitChiose,
|
|
|
+ visitRules: {
|
|
|
+ overview: [{ required: true, message: "请输入学生近况" }],
|
|
|
+ feedback: [{ required: true, message: "请输入家长反馈" }],
|
|
|
+ visitTime: [{ required: true, message: "请输入回访时间" }],
|
|
|
+ visitType: [{ required: true, message: "请选择回访类型" }]
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -819,10 +902,10 @@ export default {
|
|
|
return template[val];
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ activated () {
|
|
|
this.init();
|
|
|
},
|
|
|
- activated () {
|
|
|
+ mounted () {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
@@ -1293,6 +1376,31 @@ export default {
|
|
|
closePayVisible () {
|
|
|
this.$refs["payForm"].resetFields();
|
|
|
this.payVisible = false;
|
|
|
+ },
|
|
|
+ addVisit (row) {
|
|
|
+ console.log(row)
|
|
|
+ this.visitForm.musicGroupId = this.teamid
|
|
|
+ this.visitForm.studentId = row.userId
|
|
|
+ this.visitVisiable = true;
|
|
|
+ },
|
|
|
+ handleChange (val) {
|
|
|
+ this.visitForm.type = val[0]
|
|
|
+ this.visitForm.purpose = val[1]
|
|
|
+ },
|
|
|
+ submitAddVisit () {
|
|
|
+ console.log(this.$refs.visitForm)
|
|
|
+ this.$refs.visitForm.validate(res => {
|
|
|
+ if (res) {
|
|
|
+ addVisit(cleanDeep(this.visitForm)).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success('新增成功')
|
|
|
+ this.visitVisiable = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(this.visitForm)
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -1307,6 +1415,12 @@ export default {
|
|
|
};
|
|
|
this.$refs["quitForm"].resetFields();
|
|
|
}
|
|
|
+ },
|
|
|
+ visitVisiable (val) {
|
|
|
+ if (!val) {
|
|
|
+ this.$refs["visitForm"].resetFields();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
};
|