Commit 73d0bc89 authored by xiongjinke's avatar xiongjinke

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dsk-operate-ui/src/views/project/projectList/component/gjjl.vue
#	dsk-operate-ui/src/views/project/projectList/component/zlwd.vue
parents 01c00971 13fe9995
...@@ -108,9 +108,8 @@ export function addGJJL(param) { ...@@ -108,9 +108,8 @@ export function addGJJL(param) {
//删除跟进记录 //删除跟进记录
export function delGJJL(param) { export function delGJJL(param) {
return request({ return request({
url: '/business/record/remove/', url: '/business/record/remove/'+param,
method: 'DELETE', method: 'DELETE',
params:param
}) })
} }
...@@ -183,3 +182,20 @@ export function delZLWD(param) { ...@@ -183,3 +182,20 @@ export function delZLWD(param) {
data:param data:param
}) })
} }
//查询关联项目
export function relateProject(param) {
return request({
url: '/business/record/relate/project/'+param,
method: 'get',
})
}
//查询跟进动态
export function allRecord(param) {
return request({
url: '/business/record/all/list',
method: 'get',
params:param,
})
}
...@@ -579,8 +579,8 @@ ...@@ -579,8 +579,8 @@
} }
} }
.el-input__prefix{ .el-input__prefix .el-input__icon{
left: 8px; //left: 8px;
top: -2px; top: -2px;
position: absolute; position: absolute;
} }
...@@ -869,6 +869,7 @@ ...@@ -869,6 +869,7 @@
.img{ .img{
float: left; float: left;
margin-right: 8px; margin-right: 8px;
margin-top: -2px;
} }
} }
} }
......
...@@ -62,11 +62,25 @@ export default { ...@@ -62,11 +62,25 @@ export default {
saveAs(text, name, opts) { saveAs(text, name, opts) {
saveAs(text, name, opts); saveAs(text, name, opts);
}, },
exportByPost(url, params){
var url = baseURL + url
axios({
method: 'post',
url: url,
responseType: 'blob',
data: params,
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
this.saveAs(blob, decodeURI(res.headers['download-filename']))
})
},
async printErrMsg(data) { async printErrMsg(data) {
const resText = await data.text(); const resText = await data.text();
const rspObj = JSON.parse(resText); const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
Message.error(errMsg); Message.error(errMsg);
} },
} }
<template> <template>
<div> <div>
<el-card class="box-card noborder"> <el-card class="box-card noborder">
<div class="cardtitles">跟进记录</div> <div class="cardtitles" v-if="showtype != 'projectgjdt'">跟进记录</div>
<div style="height: 24px" v-if="showtype == 'projectgjdt'"></div>
<div class="records"> <div class="records">
<div class="writeIn"> <div class="writeIn">
<div class="default" v-if="isEdit == false" @click="getEdit"> <div class="default" v-if="isEdit == false" @click="getEdit">
...@@ -24,6 +25,10 @@ ...@@ -24,6 +25,10 @@
<el-option v-for="(item,index) in glqylist" :key="index" :label="item.companyName" :value="item.customerId"></el-option> <el-option v-for="(item,index) in glqylist" :key="index" :label="item.companyName" :value="item.customerId"></el-option>
</el-select> </el-select>
</template> </template>
<el-select v-if="showtype == 'projectgjdt'" v-model="projectId" class="w128" placeholder="关联项目">
<i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/ico_1.png"></i>
<el-option v-for="(item,index) in projectList" :key="index" :label="item.projectName" :value="item.id"></el-option>
</el-select>
<el-input v-model="addParam.name" placeholder="拜访对象" style="width: 100px;"> <el-input v-model="addParam.name" placeholder="拜访对象" style="width: 100px;">
<i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/ico_2.png"></i> <i slot="prefix" class="el-input__icon"><img src="@/assets/images/project/ico_2.png"></i>
</el-input> </el-input>
...@@ -65,7 +70,7 @@ ...@@ -65,7 +70,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="recordlist" v-if="showtype=='gjjl' && recordlist.total>0"> <div class="recordlist" v-if="showtype=='gjjl' || showtype == 'projectgjdt' && recordlist.total>0">
<div class="rec_detail" v-for="(item,index) in recordlist.rows"> <div class="rec_detail" v-for="(item,index) in recordlist.rows">
<div class="rec_time"> <div class="rec_time">
...@@ -116,7 +121,7 @@ ...@@ -116,7 +121,7 @@
<script> <script>
import "@/assets/styles/project.scss" import "@/assets/styles/project.scss"
import {getFollowList,addFollowRecord,getUserList,delFollowRecord} from '@/api/custom/custom' import {getFollowList,addFollowRecord,getUserList,delFollowRecord} from '@/api/custom/custom'
import {getGJJL,addGJJL,delGJJL} from '@/api/project/project' import {getGJJL,addGJJL,delGJJL,relateProject,allRecord} from '@/api/project/project'
import {getEnterprise,getDictType,} from '@/api/main' import {getEnterprise,getDictType,} from '@/api/main'
export default { export default {
props:{ props:{
...@@ -129,10 +134,6 @@ ...@@ -129,10 +134,6 @@
default: "" default: ""
}, },
datas:[],//数据源 datas:[],//数据源
detailId: { //从企业详情跳转过来ID
type: Number,
default: 0
}
}, },
name: 'gjjl', name: 'gjjl',
data(){ data(){
...@@ -156,7 +157,9 @@ ...@@ -156,7 +157,9 @@
recordlist:[],//列表数据源 recordlist:[],//列表数据源
isdel:false, isdel:false,
delID:'',//删除记录的ID delID:'',//删除记录的ID
projectId:this.detailId ? this.detailId : parseInt(this.$route.query.id),//项目详情id projectId:parseInt(this.$route.query.id),//项目详情id
userId:this.$store.state.user.userId,//当前用户id
projectList:[],//关联项目
} }
}, },
computed: { computed: {
...@@ -178,11 +181,25 @@ ...@@ -178,11 +181,25 @@
if(this.showtype == 'gjjl'){ if(this.showtype == 'gjjl'){
this.getGJJL() this.getGJJL()
} }
//项目管理跟进动态
if(this.showtype == 'projectgjdt'){
this.projectId = null//项目id暂时清空,必须手选id
relateProject(this.userId).then(res=>{
this.projectList = res.data
})
this.getGJDT()
}
console.log(this.types) console.log(this.types)
}, },
methods:{ methods:{
//添加跟进动态 //添加跟进动态
addFollow(){ addFollow(){
if(this.types == 'projectgjdt'){
if(this.projectId == "" || this.projectId == null){
this.$message.error('请选择关联项目!')
return false
}
}
if(this.types == 'gjdt'){ if(this.types == 'gjdt'){
if(this.customerIds){ if(this.customerIds){
this.addParam.customerId = this.customerIds this.addParam.customerId = this.customerIds
...@@ -197,7 +214,7 @@ ...@@ -197,7 +214,7 @@
} }
}) })
} }
if(this.types == 'gjjl'){ if(this.types == 'gjjl' || this.types == 'projectgjdt'){
let param = { let param = {
businessId:this.projectId, businessId:this.projectId,
userId:this.$store.state.user.userId, userId:this.$store.state.user.userId,
...@@ -233,7 +250,7 @@ ...@@ -233,7 +250,7 @@
} }
}) })
} }
if(this.types == 'gjjl') { if(this.types == 'gjjl' || this.types == 'projectgjdt') {
delGJJL(this.delID).then(result => { delGJJL(this.delID).then(result => {
if (result.code == 200) { if (result.code == 200) {
this.handleCurrentChange(1) this.handleCurrentChange(1)
...@@ -244,6 +261,7 @@ ...@@ -244,6 +261,7 @@
} }
}, },
//跟进动态列表 //跟进动态列表
//客户管理跟进动态
getGJDTlist(){ getGJDTlist(){
let param = { let param = {
pageNum:this.pageNum,//页码 pageNum:this.pageNum,//页码
...@@ -260,6 +278,22 @@ ...@@ -260,6 +278,22 @@
}) })
}) })
}, },
//项目管理跟进动态
getGJDT(){
let param = {
pageNum:this.pageNum,//页码
pageSize:this.pageSize,
userId: this.userId
}
allRecord(param).then(result=>{
this.recordlist = result.code == 200?result:[]
// this.recordlist.rows.forEach(item=>{
// item.createTime = this.gettime(item.createTime)
// item.nextVisitTime = this.gettime(item.nextVisitTime)
// })
})
},
//项目管理项目详情跟进记录
getGJJL(){ getGJJL(){
let param = { let param = {
pageNum:this.pageNum,//页码 pageNum:this.pageNum,//页码
...@@ -278,6 +312,9 @@ ...@@ -278,6 +312,9 @@
if(this.showtype == 'gjjl'){ if(this.showtype == 'gjjl'){
this.getGJJL() this.getGJJL()
} }
if(this.showtype == 'projectgjdt'){
this.getGJDT()
}
}, },
getEdit(){ getEdit(){
this.isEdit = true; this.isEdit = true;
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
if(res.code == 200){ if(res.code == 200){
this.$message.success('删除成功') this.$message.success('删除成功')
this.ondel = -1 this.ondel = -1
this.getlist() this.handleCurrentChange(1)
} }
}) })
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="cardtitles">资料文档</div> <div class="cardtitles">资料文档</div>
<div class="searchbtns"> <div class="searchbtns">
<div class="searchInput"> <div class="searchInput">
<el-input type="text" placeholder="输入关键词查询"></el-input> <el-input type="text" v-model="param.keyword" placeholder="输入关键词查询"></el-input>
<div class="btn" @click="handleCurrentChange(1)">搜索</div> <div class="btn" @click="handleCurrentChange(1)">搜索</div>
</div> </div>
<div class="btn btn_primary h32 b2" @click="getUP"><div class="img img2"></div>上传</div> <div class="btn btn_primary h32 b2" @click="getUP"><div class="img img2"></div>上传</div>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:multiple="false" :multiple="false"
ref="upload" ref="upload"
:file-list="fileList" :file-list="fileList"
accept=".word,.pdf.excel,.xlsx" accept=".word,.pdf.excel,.xlsx,.doc,.docx"
:headers="headers" :headers="headers"
:show-file-list="false" :show-file-list="false"
:on-success="onSuccess"> :on-success="onSuccess">
...@@ -105,6 +105,13 @@ ...@@ -105,6 +105,13 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<div class="delform" v-if="ondel != ''">
<div class="words">是否将文档删除</div>
<div>
<div class="btnsmall btn_primary h28" @click="delQY()">确定</div>
<div class="btnsmall btn_cancel h28" @click="ondel = ''">取消</div>
</div>
</div>
</div> </div>
</el-card> </el-card>
</div> </div>
...@@ -116,12 +123,6 @@ ...@@ -116,12 +123,6 @@
import { getZLWD ,delZLWD} from "@/api/project/project"; import { getZLWD ,delZLWD} from "@/api/project/project";
export default { export default {
name: 'zlwd', name: 'zlwd',
props: {
detailId: { //从企业详情跳转过来ID
type: Number,
default: 0
}
},
data(){ data(){
return{ return{
isupload:false, isupload:false,
...@@ -131,15 +132,17 @@ ...@@ -131,15 +132,17 @@
fileList: [], fileList: [],
headers: { headers: {
Authorization: "Bearer " + getToken(), Authorization: "Bearer " + getToken(),
filePath:this.detailId ? this.detailId : this.$route.query.id, filePath:this.$route.query.id,
}, },
param:{ param:{
pageNum:1, pageNum:1,
pagesize:20, pagesize:20,
filePath:this.detailId ? this.detailId : this.$route.query.id, filePath:this.$route.query.id,
keyword:'',
}, },
fileDatas:[], fileDatas:[],
filename:'', filename:'',
ondel:"",
} }
}, },
created(){ created(){
...@@ -148,20 +151,24 @@ ...@@ -148,20 +151,24 @@
}, },
methods:{ methods:{
getall(){ getall(){
this.param.filePath = this.detailId ? this.detailId : this.$route.query.id this.param.filePath = this.$route.query.id
this.filename='' this.filename=''
this.headers.filePath = this.detailId ? this.detailId : this.$route.query.id this.headers.filePath = this.$route.query.id
this.handleCurrentChange(1) this.handleCurrentChange(1)
}, },
getList(){ getList(){
getZLWD(this.param).then(res=>{ getZLWD(this.param).then(res=>{
this.fileDatas = res this.fileDatas = res
if(this.fileDatas.rows!=null && this.fileDatas .length>0){ if(this.fileDatas.rows!=null && this.fileDatas.rows.length>0){
this.fileDatas.forEach(item=>{ this.fileDatas.rows.forEach(item=>{
let names = item.filePath.split('\\') let names = item.filePath.split('/')
item.name = names[names.length-1] item.name = names[names.length-1]
let types = item.name.split('.') let types = item.name.split('.')
item.type = types.length>1?types[1]:'file' item.type = types.length>1?types[1]:'file'
if(item.type == 'xls' || item.type == 'xlsx' )
item.type = 'excel'
if(item.type == 'doc' || item.type == 'docx' )
item.type = 'word'
}) })
} }
}) })
...@@ -169,7 +176,7 @@ ...@@ -169,7 +176,7 @@
getFile(row){ getFile(row){
if(row.type == 'file'){ if(row.type == 'file'){
this.filename = row.name this.filename = row.name
this.headers.filePath = this.detailId ? this.detailId : this.$route.query.id+'\\'+row.name this.headers.filePath = this.$route.query.id+'/'+row.name
this.param.filePath = row.filePath this.param.filePath = row.filePath
this.handleCurrentChange(1) this.handleCurrentChange(1)
...@@ -184,20 +191,33 @@ ...@@ -184,20 +191,33 @@
}) })
}, },
downnlod(row){ downnlod(row){
let a = document.createElement("a"); let param = {filePath:row.filePath}
a.setAttribute("href", row.filePath); // this.$download.saveAs(row.filePath,row.name);
a.setAttribute("download", row.name); this.$download.exportByPost('/business/file/download',param);
document.body.appendChild(a); // // this.$download()
a.click(); // let a = document.createElement("a");
// a.setAttribute("href", row.filePath);
// a.setAttribute("download", row.name);
// document.body.appendChild(a);
// a.click();
}, },
del(path){
delZLWD(path).then(res=>{ delQY(){
let param = {
filePath:this.ondel
}
delZLWD(JSON.stringify(param)).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.handleCurrentChange(1) this.handleCurrentChange(1)
this.ondel = ''
} }
}) })
}, },
del(path){
this.ondel = path
},
handleFileListChange(file, fileList) { handleFileListChange(file, fileList) {
if (fileList.length > 0) { if (fileList.length > 0) {
this.fileList = [fileList[fileList.length - 1]]; this.fileList = [fileList[fileList.length - 1]];
...@@ -231,7 +251,7 @@ ...@@ -231,7 +251,7 @@
//翻页 //翻页
handleCurrentChange(val) { handleCurrentChange(val) {
this.param.pageNum(1) this.param.pageNum=val
this.getList() this.getList()
}, },
cancel(){ cancel(){
...@@ -246,6 +266,10 @@ ...@@ -246,6 +266,10 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.delform{
position: fixed; left:50%; top:50%; transform:translate(-50%,-50%)
}
.filepath{ .filepath{
font-size: 12px; font-size: 12px;
height: 30px; height: 30px;
......
<template> <template>
<div class="app-container"> <div class="app-container">
跟进动态 <gjjl types="projectgjdt"></gjjl>
</div> </div>
</template> </template>
<script> <script>
import gjjl from '../projectList/component/gjjl.vue'
export default { export default {
name: 'Trends', name: 'Trends',
components: {gjjl,},
data() { data() {
return { return {
} }
......
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