Commit ab0e4ec8 authored by youjie's avatar youjie

优化到访、邀约

parent 7bed3985
......@@ -26,8 +26,7 @@ export default {
</script>
<style>
@import url("//at.alicdn.com/t/font_2077629_3u1r9gsz178.css");
@import url("//at.alicdn.com/t/c/font_2077629_i7yuqryh01e.css");
@font-face {
font-family: "din";
src: url("./assets/font/DIN-Bold.otf") format("opentype");
......
......@@ -303,6 +303,17 @@ export function getStudentDorpDownList(data) {
})
}
/**
* 上传到访表
*/
export function SetStudentVoucher(data) {
return request({
url: '/CustomerStudent/SetStudentVoucher',
method: 'post',
data
})
}
/**
* 添加修改学员
......
......@@ -281,9 +281,18 @@
<div class="stage_label">
到访表
</div>
<div class="stage_value row">
<div class="q-pr-lg text-blue" v-if="customObj.FileVoucher">
<a :href="customObj.FileVoucher" target="_blank" rel="noopener noreferrer"
<div class="stage_value row items-center">
<div class="q-pr-lg text-blue row items-center" v-if="customObj.FileVoucher">
<el-image
v-if="customObj.FileVoucher.indexOf('jpg')!=-1||customObj.FileVoucher.indexOf('JPG')!=-1
||customObj.FileVoucher.indexOf('png')!=-1||customObj.FileVoucher.indexOf('PNG')!=-1"
style="height: 30px"
:src="customObj.FileVoucher"
:preview-src-list="[customObj.FileVoucher]"
:z-index="9999999"
fit="cover">
</el-image>
<a v-else :href="customObj.FileVoucher" target="_blank" rel="noopener noreferrer"
style="color:inherit;">
查看
</a>
......@@ -361,6 +370,7 @@
GetStudentTypeList,
getStudentDorpDownList,
GetNeedsList,
SetStudentVoucher,//上传到访表
} from "../../../api/school/index";
import {
getGuestBasicsEnumList,
......@@ -530,6 +540,9 @@
UploadSelfFile("FileVoucher", files, res => {
if (res.Code == 1) {
this.customObj.FileVoucher = res.FileUrl
if(this.customObj.StuId>0){
this.SetStudentVoucher()
}
}else{
this.$message.error('上传文件失败,请重新上传');
}
......@@ -542,6 +555,19 @@
}
});
},
SetStudentVoucher(){
let msg = {
StuId: this.customObj.StuId,
FileVoucher: this.customObj.FileVoucher
}
SetStudentVoucher(msg).then(res => {
if(res.Code==1){
this.$message.success('上传到访表成功')
}else{
this.$message.success('上传到访表失败')
}
})
},
//获取客户需求
getGetNeedsList() {
GetNeedsList().then(res => {
......
......@@ -244,10 +244,13 @@
<template v-if="isInvite">
<q-toggle v-model="props.row.IsSureConsultTime" :false-value="0" :true-value="1"
@input="setInvite(props.row)"/>
<q-tooltip>{{props.row.IsSureConsultTime?'取消邀约':'确认邀约咨询30分钟以上'}}</q-tooltip>
<q-tooltip>{{props.row.IsSureConsultTime?'确认邀约咨询30分钟以上':'确认邀约咨询30分钟以上'}}</q-tooltip>
</template>
<span v-else class="q-pr-sm text-grey-7">
{{props.row.IsSureConsultTime?'已邀约':'未邀约'}}
<q-icon v-if="props.row.IsSureConsultTime" name="iconfont icon-yiyaoyue" size="20px"
color="primary"/>
<q-icon v-else name="iconfont icon-weiyaoyue" size="20px"
color="grey-5"/>
</span>
</div>
<span>{{props.row.CreateByName}}</span>
......@@ -570,16 +573,33 @@
},
methods: {
setInvite(row){
if(!this.isInvite) return
let _this = this
this.$q.dialog({
title: '提示信息',
message: `是否确定${row.IsSureConsultTime==1?'邀约':'取消邀约'}?`,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
if(!_this.isInvite) return
let msg = {
StuId: row.StuId,
IsSureConsultTime: row.IsSureConsultTime
}
SetStudentSureConsult(msg).then(res => {
if (res.Code == 1) {
this.$emit("success");
}
});
}).onCancel(() =>{
if(row.IsSureConsultTime==1){
return row.IsSureConsultTime = 0
}if(row.IsSureConsultTime==0){
return row.IsSureConsultTime = 1
}
})
},
//是否有下载客户资料权限
IsDownLoadStu() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment