|
@@ -1,16 +1,43 @@
|
|
|
<template>
|
|
|
<div class="Marketingamount-box" v-loading.fullscreen.lock="fullscreenLoading">
|
|
|
<!-- 详情弹出框 -->
|
|
|
- <el-dialog title="详情" :visible.sync="particulars">
|
|
|
+ <!-- <el-dialog title="详情" :visible.sync="particulars">
|
|
|
<el-table >
|
|
|
<el-table-column property="date" label="日期" width="150"></el-table-column>
|
|
|
<el-table-column property="name" label="姓名" width="200"></el-table-column>
|
|
|
<el-table-column property="address" label="地址"></el-table-column>
|
|
|
</el-table>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
<!-- 详情弹出框 -->
|
|
|
<el-dialog title="拜访记录" :visible.sync="visitlog">
|
|
|
-
|
|
|
+ <div style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
+ <div style="color: red;">PS:清除行时间保存时删除此行</div>
|
|
|
+ <div style="text-align: right;margin-bottom: 10px;">
|
|
|
+ <el-button size="small" @click="preservebtn" type="primary">保存</el-button>
|
|
|
+ <el-button size="small" @click="Addline" type="primary">添加一行</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="callondialog-ul">
|
|
|
+ <div v-for="(item,index) in callonarr" :key="index" class="callondialog-li">
|
|
|
+ <div style="display: flex;justify-content: space-between;">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 380px;"
|
|
|
+ v-model="item.beginDt"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ <el-input style="width: 255px;" type="text" placeholder="客户公司" v-model="item.customerUnit"></el-input>
|
|
|
+ <el-input style="width: 168px;" type="text" placeholder="客户名称" v-model="item.customerName"></el-input>
|
|
|
+ <el-input style="width: 168px;" type="text" placeholder="客户职位" v-model="item.customerJob"></el-input>
|
|
|
+ <el-input style="width: 168px;" type="text" placeholder="联系方式" v-model="item.customerContact"></el-input>
|
|
|
+ </div>
|
|
|
+ <el-input style="width: 100%;" type="text" placeholder="拜访事项" v-model="item.remark"></el-input>
|
|
|
+ <!-- <div style="display: flex;justify-content: space-between;">
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
<div class="search-head">
|
|
|
<el-form ref="form" label-width="75px">
|
|
@@ -21,14 +48,14 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-form ref="form" label-width="75px">
|
|
|
- <el-form-item label="人员名称:">
|
|
|
+ <el-form-item label="销售人员:">
|
|
|
<el-select :disabled='verifytf' @change="EmployeeSwitching" filterable v-model="personnelname" placeholder="请选择人员名称">
|
|
|
<el-option v-for="(item,index) in personnelnamearr" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-form ref="form" label-width="75px">
|
|
|
- <el-form-item label="年:">
|
|
|
+ <el-form-item label="年份:">
|
|
|
<el-select @change="PostMarketingSalesGroupList($event,1)" filterable v-model="years" placeholder="请选择年">
|
|
|
<el-option v-for="(item,index) in yearsarr" :key="index" :label="item.year" :value="item.year"></el-option>
|
|
|
</el-select>
|
|
@@ -42,7 +69,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-form ref="form" label-width="75px">
|
|
|
- <el-form-item label="月:">
|
|
|
+ <el-form-item label="月份:">
|
|
|
<el-select @change="MonthlySwitch" filterable v-model="month" placeholder="请选择月">
|
|
|
<el-option v-for="(item,index) in montharr" :key="index" :label="item.name" :value="item.name"></el-option>
|
|
|
</el-select>
|
|
@@ -122,15 +149,32 @@
|
|
|
<el-table-column
|
|
|
prop="teamName"
|
|
|
label="团组名"
|
|
|
- width="150">
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+
|
|
|
+ trigger="hover">
|
|
|
+ <div>
|
|
|
+ 客户单位: {{scope.row.clientUnit}}<br/>
|
|
|
+ 客户名称: {{scope.row.clientName}}
|
|
|
+ </div>
|
|
|
+ <span slot="reference">{{scope.row.teamName}}</span>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
prop="clientUnit"
|
|
|
label="客户单位">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="clientName"
|
|
|
label="客户名称">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column
|
|
|
+ prop="groupSales"
|
|
|
+ label="营业额">
|
|
|
+ <template slot-scope="scope">¥ {{ scope.row.groupSales | townum}}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="visitDate"
|
|
@@ -144,11 +188,17 @@
|
|
|
width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ prop="collectionDays"
|
|
|
+ label="收款日期"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope">{{ scope.row.collectionDays | getvisitDate}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
width="150"
|
|
|
label="操作">
|
|
|
- <template>
|
|
|
- <el-button size="mini" @click="particulars=true" type="primary">查看</el-button>
|
|
|
- <el-button size="mini" @click="visitlog=true" type="primary">拜访</el-button>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button size="mini" @click="particulars=true" type="primary">查看</el-button> -->
|
|
|
+ <el-button size="mini" @click="bfjlbtn(scope.row)" type="primary">拜访记录</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -217,21 +267,97 @@ export default {
|
|
|
mratio:0,
|
|
|
fullscreenLoading:false,
|
|
|
verifytf:false,
|
|
|
+ //拜访日期
|
|
|
+ pickerOptions: {
|
|
|
+ shortcuts: [{
|
|
|
+ text: '今天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', new Date());
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '昨天',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '一周前',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ callonarr:[],
|
|
|
+ callonarrs:[
|
|
|
+ {
|
|
|
+ rowNumber:0,
|
|
|
+ diId:"",
|
|
|
+ beginDt:"",
|
|
|
+ endDt:"",
|
|
|
+ customerUnit:"",
|
|
|
+ customerJob:"",
|
|
|
+ customerName:"",
|
|
|
+ customerContact:"",
|
|
|
+ remark:"",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ rowNumber:0,
|
|
|
+ diId:"",
|
|
|
+ beginDt:"",
|
|
|
+ endDt:"",
|
|
|
+ customerUnit:"",
|
|
|
+ customerJob:"",
|
|
|
+ customerName:"",
|
|
|
+ customerContact:"",
|
|
|
+ remark:"",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ rowNumber:0,
|
|
|
+ diId:"",
|
|
|
+ beginDt:"",
|
|
|
+ endDt:"",
|
|
|
+ customerUnit:"",
|
|
|
+ customerJob:"",
|
|
|
+ customerName:"",
|
|
|
+ customerContact:"",
|
|
|
+ remark:"",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ rowNumber:0,
|
|
|
+ diId:"",
|
|
|
+ beginDt:"",
|
|
|
+ endDt:"",
|
|
|
+ customerUnit:"",
|
|
|
+ customerJob:"",
|
|
|
+ customerName:"",
|
|
|
+ customerContact:"",
|
|
|
+ remark:"",
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
+ value2: '',
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ //bfy
|
|
|
handleSizeChange(val) {
|
|
|
this.pagesize=val;
|
|
|
this.PostMarketingSalesGroupList(this.years,1);
|
|
|
},
|
|
|
+ //bfy
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage=val;
|
|
|
this.PostMarketingSalesGroupList(this.years,1);
|
|
|
},
|
|
|
+ //pfy
|
|
|
handleSizeChanges(val) {
|
|
|
this.pagesizes=val;
|
|
|
this.PostMarketingSalesOrderRanking(this.YbeginDt,this.YendDt);
|
|
|
},
|
|
|
+ //pfy
|
|
|
handleCurrentChanges(val) {
|
|
|
this.currentPages=val;
|
|
|
this.PostMarketingSalesOrderRanking(this.YbeginDt,this.YendDt);
|
|
@@ -298,7 +424,7 @@ export default {
|
|
|
},
|
|
|
data: {
|
|
|
portType:1,
|
|
|
- userId: 208,
|
|
|
+ userId: this.userId,
|
|
|
pageId:180,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
@@ -431,6 +557,12 @@ export default {
|
|
|
},
|
|
|
//公司切换
|
|
|
CompanySwitching(val){
|
|
|
+ this.yamount=0.00;
|
|
|
+ this.yratio=0.00;
|
|
|
+ this.qamount=0.00;
|
|
|
+ this.qratio=0.00;
|
|
|
+ this.mamount=0.00;
|
|
|
+ this.mratio=0.00;
|
|
|
this.personnelnamearr=[];
|
|
|
this.personnelname='';
|
|
|
if(val==-1){
|
|
@@ -443,6 +575,7 @@ export default {
|
|
|
this.personnelnamearr.push(this.personnelnamearrs[i]);
|
|
|
}
|
|
|
}
|
|
|
+ this.personnelname=this.personnelnamearr[0].id;
|
|
|
}
|
|
|
if(this.userId!=233){
|
|
|
this.verifytf=true;
|
|
@@ -546,6 +679,7 @@ export default {
|
|
|
endDt:endDt,
|
|
|
pageIndex:that.currentPage,
|
|
|
pageSize:that.pagesize,
|
|
|
+ searchCriteria:"",
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
@@ -571,10 +705,6 @@ export default {
|
|
|
that.fullscreenLoading=false;
|
|
|
that.$message.error('接口报错请联系信息部!');
|
|
|
});
|
|
|
- },
|
|
|
- //验证id
|
|
|
- verifyID(){
|
|
|
-
|
|
|
},
|
|
|
//统计api
|
|
|
PostMarketingSalesGroupStatistics(beginDt,endDt) {
|
|
@@ -661,11 +791,142 @@ export default {
|
|
|
that.$message.error('接口报错请联系信息部!');
|
|
|
});
|
|
|
},
|
|
|
+ //打开拜访记录
|
|
|
+ bfjlbtn(val){
|
|
|
+ this.visitlog=true;
|
|
|
+ this.DiId=val.id;
|
|
|
+ this.PostMarketingSalesVCList();
|
|
|
+ },
|
|
|
+ //新增一行
|
|
|
+ Addline(){
|
|
|
+ this.callonarr.push({
|
|
|
+ rowNumber:0,
|
|
|
+ diId:"",
|
|
|
+ beginDt:"",
|
|
|
+ endDt:"",
|
|
|
+ customerUnit:"",
|
|
|
+ customerJob:"",
|
|
|
+ customerName:"",
|
|
|
+ customerContact:"",
|
|
|
+ remark:"",
|
|
|
+ },)
|
|
|
+
|
|
|
+ },
|
|
|
+ //处理时间
|
|
|
+ disposeTime(val){
|
|
|
+ var date = new Date(val);
|
|
|
+ var y = date.getFullYear();
|
|
|
+ var m = date.getMonth() + 1;
|
|
|
+ m = m < 10 ? ('0' + m) : m;
|
|
|
+ var d = date.getDate();
|
|
|
+ d = d < 10 ? ('0' + d) : d;
|
|
|
+ var hh = date.getHours();
|
|
|
+ hh = hh < 10 ? ('0' + hh) : hh;
|
|
|
+ var mm = date.getMinutes();
|
|
|
+ mm = mm < 10 ? ('0' + mm) : mm;
|
|
|
+ var ss = date.getSeconds();
|
|
|
+ ss = ss < 10 ? ('0' + ss) : ss;
|
|
|
+ let time = y + '-' + m + '-' + d+' '+hh+':'+mm+':'+ss;
|
|
|
+ return time
|
|
|
+ },
|
|
|
+ //保存
|
|
|
+ preservebtn(){
|
|
|
+ console.log(this.callonarr);
|
|
|
+ var preservearr=[]
|
|
|
+ for(let i=0;i<this.callonarr.length;i++){
|
|
|
+ if(this.callonarr[i].beginDt!=''&&this.callonarr[i].beginDt!=null){
|
|
|
+ preservearr.push(this.callonarr[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let p=0;p<preservearr.length;p++){
|
|
|
+ preservearr[p].endDt=this.disposeTime(preservearr[p].beginDt[1]);
|
|
|
+ preservearr[p].beginDt=this.disposeTime(preservearr[p].beginDt[0]);
|
|
|
+ preservearr[p].diId=this.DiId;
|
|
|
+ }
|
|
|
+ this.PostMarketingSalesVCSave(preservearr)
|
|
|
+ },
|
|
|
+ //查询拜访记录
|
|
|
+ PostMarketingSalesVCList() {
|
|
|
+ var url = "/api/Statistics/PostMarketingSalesVCList"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ portType:1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId:180,
|
|
|
+ pageIndex:1,
|
|
|
+ pageSize:100,
|
|
|
+ diId:that.DiId,
|
|
|
+ search:'',
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if(res.data.data.length>0){
|
|
|
+ that.callonarr=res.data.data;
|
|
|
+ for(let c=0;c<that.callonarr.length;c++){
|
|
|
+ that.callonarr[c].beginDt=(that.callonarr[c].beginDt+'*'+that.callonarr[c].endDt).split('*')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.callonarr=that.callonarrs;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('查询拜访记录失败!');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //保存api
|
|
|
+ PostMarketingSalesVCSave(items) {
|
|
|
+ var url = "/api/Statistics/PostMarketingSalesVCSave"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ portType:1,
|
|
|
+ userId: that.userId,
|
|
|
+ pageId:180,
|
|
|
+ items:items
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.PostMarketingSalesVCList();
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message:res.data.msg,
|
|
|
+ duration:1000,
|
|
|
+ type:"error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error('查询拜访记录失败!');
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
filters: {
|
|
|
getvisitDate(val) {
|
|
|
return val.split(' ')[0];
|
|
|
- }
|
|
|
+ },
|
|
|
+ townum(val){
|
|
|
+ return val.toFixed(2)
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
customertype: {
|
|
@@ -805,4 +1066,25 @@ export default {
|
|
|
.search-head .el-select{
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.Marketingamount-box .el-dialog__body{
|
|
|
+ padding-top: 0px;
|
|
|
+}
|
|
|
+.Marketingamount-box .el-dialog{
|
|
|
+ width: 1200px;
|
|
|
+}
|
|
|
+.callondialog-ul{
|
|
|
+ height: 530px;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
+.callondialog-li{
|
|
|
+ padding: 20px 0 10px 0;
|
|
|
+ border-top: #c7c7c7 dashed 1px;
|
|
|
+}
|
|
|
+.callondialog-li:last-child{
|
|
|
+ border-bottom: #c7c7c7 dashed 1px;
|
|
|
+}
|
|
|
+.callondialog-li .el-input,.el-range-editor.el-input__inner{
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|