Commit 6bfd325d authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/huaguohao/crm

# Conflicts:
#	src/plugins/index.js
parents 423d1863 81cf8a05
This diff is collapsed.
<style>
@import '../../assets/css/customerManage.css';
.SelectedAccount_box{
@import '../../assets/css/customerManage.css';
.SelectedAccount_box {
display: flex;
flex-wrap: wrap;
}
.SelectedAccount{
}
.SelectedAccount {
margin: 5px;
cursor: pointer;
}
.sub-header div.active{
}
.sub-header div.active {
color: #409EFF;
border-bottom: 2px solid #409EFF;
}
.sub-header div{
}
.sub-header div {
padding: 20px 15px;
cursor: pointer;
}
.sub-header{
}
.sub-header {
display: flex;
padding: 0 20px;
background-color: #fff;
}
}
</style>
<template>
<div class="customerManage">
<div class="sub-header">
<div v-for="(item,index) in headerList" :key="index"
:class="selectTitle==item.id?'active':''"
<div v-for="(item,index) in headerList" :key="index" :class="selectTitle==item.id?'active':''"
@click="clickTitle(item)">{{item.title}}</div>
</div>
<!-- 客户来源 -->
<customerSource v-if="selectTitle==1"></customerSource>
<!-- 分配规则 -->
<distributionRules v-if="selectTitle==2"></distributionRules>
<!-- 排行统计配置 -->
<rankConfig v-if="selectTitle==3"></rankConfig>
</div>
</template>
<script>
import customerSource from "./customerSource";
import distributionRules from "./distributionRules";
export default {
import customerSource from "./customerSource";
import distributionRules from "./distributionRules";
import rankConfig from "./rankConfig";
export default {
components: {
customerSource,
distributionRules
distributionRules,
rankConfig,
},
data() {
return {
selectTitle:1,
headerList:[
{title:'客户来源',id:1},
{title:'分配规则',id:2},
selectTitle: 1,
headerList: [{
title: '客户来源',
id: 1
},
{
title: '分配规则',
id: 2
},
{
title: '排行统计配置',
id: 3
},
]
};
},
......@@ -59,10 +76,9 @@ export default {
},
methods: {
clickTitle(item){
clickTitle(item) {
this.selectTitle = item.id
},
}
};
};
</script>
\ No newline at end of file
<style scoped>
.distributionRules {}
.distributionRules_title {
font-weight: bold;
font-size: 18px;
font-family: perfectFont;
padding: 20px 0;
}
.page-content {
background-color: #fff;
padding: 20px;
}
.distributionRules_text {
padding: 0 0 20px 0;
}
.text-negative {
color: #f5576c
}
.distributionRules_num {
display: flex;
justify-content: space-between;
}
.distributionRules_num div {
flex: 1;
}
.dataText {
display: flex;
flex-wrap: wrap;
padding: 10px 0;
}
.dataText_text {
margin-right: 10px;
margin-bottom: 10px;
}
.select-radio {
display: flex;
align-items: center;
}
</style>
<template>
<div class="customerManage">
<h1 class="distributionRules_title">分配给以下部门/成员</h1>
<div class="page-content">
<div class="distributionRules_text">
<span>引流排行配置</span>
<span class="text-negative">*</span>
</div>
<div class="distributionRules_num">
<div>
<el-button @click="clickSelectPeople(1)">选择部门/成员</el-button>
</div>
<div><span>已选择:{{msg.FlowList.length}}</span></div>
</div>
<div class="dataText">
<el-tag v-for="(item,index) in msg.FlowList" :key="index" class="dataText_text">{{item.EmName}}
</el-tag>
</div>
<div class="distributionRules_text">
<span>销售排行配置</span>
<span class="text-negative">*</span>
</div>
<div class="distributionRules_num">
<div>
<el-button @click="clickSelectPeople(2)">选择部门/成员</el-button>
</div>
<div><span>已选择:{{msg.SaleList.length}}</span></div>
</div>
<div class="dataText">
<el-tag v-for="(item,index) in msg.SaleList" :key="index" class="dataText_text">{{item.EmName}}
</el-tag>
</div>
<br /><br />
<el-button class="add-box-btn add-box-cancel" @click="saveRankRule" :disabled="disabledOff">立即保存</el-button>
</div>
<!-- 添加账号弹窗 -->
<div v-if="isShowRuleForm">
<addDistributionRules :obj="chooseObj" @addCustomerOk="addCustomerOk" />
</div>
</div>
</template>
<script>
import addDistributionRules from "../dialogModel/addDistributionRules";
export default {
components: {
addDistributionRules
},
data() {
return {
disabledOff: false,
isShowRuleForm: false,
msg: {
ID: 0,
SNO: 1,
Content: "",//引流人员编号
Mask: "",//销售人员编号
FlowList: [], //引流排行配置
SaleList: [], //销售排行配置
},
chooseObj: {
chooseType: 1, //选择类型(1-引流人员配置,2-销售人员配置)
EmpList: [], //已选择的员工
}
};
},
mounted() {
this.GetRankRule()
let $this = this
this.MsgBus.$on('closeaaddDistributionRules', function () {
$this.isShowRuleForm = false
})
},
methods: {
saveRankRule() {
let flowIds = [];
let saleIds = [];
this.msg.FlowList.forEach(item => {
flowIds.push(item.EmployeeId)
})
this.msg.SaleList.forEach(item => {
saleIds.push(item.EmployeeId)
})
this.msg.Content = flowIds.join(',');
this.msg.Mask = saleIds.join(',');
this.disabledOff = true
this.apipost('/api/Customer/SetRankRule', this.msg, res => {
this.disabledOff = false
if (res.data.resultCode == 1) {
this.$message.success(res.data.message)
} else {
this.$message.error(res.data.message)
}
})
},
addCustomerOk() {
this.isShowRuleForm = false
},
clickSelectPeople(type) {
this.chooseObj.chooseType = type;
//引流人员配置
if (this.chooseObj.chooseType == 1) {
this.chooseObj.EmpList = this.msg.FlowList;
}
//销售人员配置
if (this.chooseObj.chooseType == 2) {
this.chooseObj.EmpList = this.msg.SaleList;
}
this.isShowRuleForm = true;
},
// 获取规则详情
GetRankRule() {
this.apipost('/api/Customer/GetRankRule', {}, res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
this.msg.ID = tempData.ID;
this.msg.SNO = tempData.SNO;
this.msg.Content = tempData.Content;
this.msg.Mask = tempData.Mask;
this.msg.FlowList = tempData.FlowList;
this.msg.SaleList = tempData.SaleList;
}
})
},
}
};
</script>
\ No newline at end of file
......@@ -6,20 +6,21 @@ export default {
apiurl: ''
},
install(Vue, options) {
Vue.prototype.isOnline = function () {
Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function () {
Vue.prototype.domainManager = function() {
//CRM API
let domainUrl = "";
domainUrl = "http://192.168.10.46:8500";
// domainUrl = "http://192.168.10.36:8098";
//domainUrl = "http://localhost:5003";
let locationName = window.location.hostname;
//旅游ERPApi
let domainPostUrl = ""
//domainPostUrl = "http://192.168.10.36:8083";
domainPostUrl = "http://192.168.10.46";
domainPostUrl = "http://192.168.10.36:8083";
//domainPostUrl = "http://192.168.10.46";
if (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com"
......@@ -48,7 +49,7 @@ export default {
},
//消息成功提示
Vue.prototype.Success = function (msg) {
Vue.prototype.Success = function(msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -56,7 +57,7 @@ export default {
});
},
//错误提示
Vue.prototype.Error = function (msg) {
Vue.prototype.Error = function(msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -65,7 +66,7 @@ export default {
},
//一般提示
Vue.prototype.Info = function (msg) {
Vue.prototype.Info = function(msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -73,7 +74,7 @@ export default {
});
},
//警告提示
Vue.prototype.Warning = function (msg) {
Vue.prototype.Warning = function(msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -81,7 +82,7 @@ export default {
});
},
//Confirm
Vue.prototype.Confirm = function (msg, callback) {
Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -101,7 +102,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue.prototype.compressImg = function (path, type, w, h) {
Vue.prototype.compressImg = function(path, type, w, h) {
let url = this.domainManager().UploadUrl;
let poise = 'width=';
w = w ? w : ''
......@@ -116,7 +117,7 @@ export default {
//旅游ERP接口
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) {
Vue.prototype.apipost2 = function(cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -165,7 +166,7 @@ export default {
}
//CRM接口
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -208,7 +209,7 @@ export default {
},
// 自动登录HTTP提交数据
Vue.prototype.apipostLogin = function (cmd, msg, successCall, faildCall) {
Vue.prototype.apipostLogin = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -251,7 +252,7 @@ export default {
},
//Java接口
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -303,7 +304,7 @@ export default {
},
//下载文件
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, callBack) {
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, callBack) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -345,7 +346,7 @@ export default {
};
callBack(result);
}
}).catch(function (res) {
}).catch(function(res) {
console.log("GetLocalFile", res);
});
}
......
......@@ -20,6 +20,7 @@ import customerOrder from "./components/customerManage/customerOrder"
import myCustomerOrder from "./components/customerManage/myCustomerOrder"
import automaticLogin from './views/automaticLogin'
import planeTicketOrder from './components/planeTicketOrder/index'
import Test from './components/Test'
Vue.use(Router);
export default new Router({
......@@ -491,6 +492,14 @@ export default new Router({
meta: {
title: "订单核算统计"
}
},
{
path: "/test",
name: "test",
component: Test,
meta: {
title: "测试命令"
}
}
]
},
......
......@@ -5,14 +5,8 @@
<h1>每日引流统计</h1>
</div>
<div style="width: 340px;">
<el-date-picker
v-model="msg.month"
type="month"
icon="el-icon-date"
slot="append"
class="input-with-select"
@change="changeMonthHandler"
placeholder="选择查询的月份">
<el-date-picker v-model="msg.month" type="month" icon="el-icon-date" slot="append" class="input-with-select"
@change="changeMonthHandler" placeholder="选择查询的月份">
</el-date-picker>
</div>
<div class="rightmenu">
......@@ -27,8 +21,17 @@
</div>
</div>
<div class="page-content" style="padding-bottom:20px;">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;height:100%;" border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column prop="DateStr" label="">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;height:100%;" border
:cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column>
<template slot-scope="scope">
<template v-if="scope.row.YearStr>0&&scope.row.MonthStr>0">
<span class="pointer" style="color:blue;text-decoration:underline;" @click="seeDetails(scope.row)">{{scope.row.DateStr}}</span>
</template>
<template v-else>
<span>{{scope.row.DateStr}} </span>
</template>
</template>
</el-table-column>
<el-table-column prop="PushCount" label="引流总数">
</el-table-column>
......@@ -64,13 +67,26 @@
</el-table-column>
</el-table>
</div>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
<clueComponent :isDrawer="isDrawer" :queryTime="queryTime"></clueComponent>
</el-drawer>
</div>
</template>
<script>
export default {
import clueComponent from "@/components/clueManagement/clueComponent";
export default {
components: {
clueComponent
},
data() {
return {
queryTime: {
StartTime: '',
EndTime: ''
},
drawer: false,
isDrawer: true,
msg: {
month: "",
YearStr: "",
......@@ -91,6 +107,19 @@ export default {
this.init();
},
methods: {
handleClose(done) {
done();
},
// 查看详情
seeDetails(row) {
var d = new Date();
var currentY = this.msg.YearStr;
var currentM = this.msg.MonthStr;
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.queryTime.StartTime = this.msg.YearStr + '-' + row.DateStr
this.queryTime.EndTime = this.msg.YearStr + '-' + row.DateStr
this.drawer = true
},
init() {
if (this.loading) return;
this.loading = true;
......@@ -107,7 +136,9 @@ export default {
}
);
},
tableRowClassName({ row }) {
tableRowClassName({
row
}) {
let cname = "font-size-12";
if (
row.DateStr == "总数" ||
......@@ -120,9 +151,12 @@ export default {
}
return cname;
},
tableCellClassName({ row, column }) {
tableCellClassName({
row,
column
}) {
if (
row[column.property].toString().indexOf("-") != -1 &&
row[column.property] && row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) {
return "warning-col";
......@@ -162,23 +196,33 @@ export default {
);
},
},
};
};
</script>
<style>
@import "../../assets/css/customerManage.css";
@import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table {
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table .xiaoji-row {
}
.el-table .xiaoji-row {
background: #ffff00;
}
}
.el-table .sum-row {
.el-table .sum-row {
background: #00b0f0;
}
.el-table .warning-col {
}
.el-table .warning-col {
background: red;
}
}
.pointer {
cursor: pointer;
}
.pointer:hover {
color: #00b0f0;
}
</style>
\ No newline at end of file
......@@ -5,15 +5,8 @@
<h1>月度引流统计</h1>
</div>
<div style="width: 340px;">
<el-date-picker
v-model="msg.month"
type="year"
icon="el-icon-date"
slot="append"
class="input-with-select"
format="yyyy 年"
@change="changeMonthHandler"
placeholder="选择查询的月份">
<el-date-picker v-model="msg.month" type="year" icon="el-icon-date" slot="append" class="input-with-select"
format="yyyy 年" @change="changeMonthHandler" placeholder="选择查询的月份">
</el-date-picker>
</div>
<div class="rightmenu">
......@@ -30,8 +23,18 @@
<el-tabs v-model="activeName" style="flex:1;height:100%;" class="diy-eltabs" tab-position="top">
<el-tab-pane label="月度数据" name="monthdata" style="background:#000">
<div class="data-box-item">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;" height="100%" border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column prop="DateStr" label="">
<el-table :data="tableData" tooltip-effect="dark" v-loading="loading" style="width: 100%;" height="100%"
border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table-column>
<template slot-scope="scope">
<template v-if="scope.row.MonthStr>0">
<span class="pointer" style="color:blue;text-decoration:underline;"
@click="seeDetails(scope.row)">{{scope.row.DateStr}}</span>
</template>
<template v-else>
<span>{{scope.row.DateStr}} </span>
</template>
</template>
</el-table-column>
<el-table-column prop="PushCount" label="引流总数">
</el-table-column>
......@@ -70,7 +73,9 @@
</el-tab-pane>
<el-tab-pane label="月度成长率" name="monthrate">
<div class="data-box-item">
<el-table :data="rateData" :formatter="formatter" tooltip-effect="dark" v-loading="rateLoading" style="width: 100%;" height="100%" border :cell-class-name="tableCellClassName" :row-class-name="tableRowClassName">
<el-table :data="rateData" :formatter="formatter" tooltip-effect="dark" v-loading="rateLoading"
style="width: 100%;" height="100%" border :cell-class-name="tableCellClassName"
:row-class-name="tableRowClassName">
<el-table-column prop="ItemName" label="">
</el-table-column>
<el-table-column prop="JanuaryRate" label="1月" :formatter="formatter">
......@@ -103,14 +108,26 @@
</div>
</el-tab-pane>
</el-tabs>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose">
<clueComponent :isDrawer="isDrawer" :queryTime="queryTime"></clueComponent>
</el-drawer>
</div>
</template>
<script>
export default {
import clueComponent from "@/components/clueManagement/clueComponent";
export default {
components: {
clueComponent
},
data() {
return {
queryTime: {
StartTime: '',
EndTime: ''
},
drawer: false,
isDrawer: true,
msg: {
month: "",
YearStr: "",
......@@ -133,6 +150,24 @@ export default {
this.initRate();
},
methods: {
handleClose(done) {
done();
},
// 查看详情
seeDetails(row) {
var d = new Date();
var currentY = this.msg.YearStr;
var currentM = this.msg.month;
if (row.DateStr.length == 2) {
currentM = '0' + row.DateStr.slice(0, 1)
} else {
currentM = row.DateStr.slice(0, 2)
}
var MonthDayNum = new Date(currentY, currentM, 0).getDate(); //计算当月的天数
this.queryTime.StartTime = this.msg.YearStr + '-' + currentM + '-01'
this.queryTime.EndTime = currentY + '-' + currentM + '-' + MonthDayNum
this.drawer = true
},
init() {
if (this.loading) return;
this.loading = true;
......@@ -163,7 +198,9 @@ export default {
}
);
},
tableRowClassName({ row }) {
tableRowClassName({
row
}) {
let cname = "font-size-12";
if (row.DateStr == "平均") {
cname += " xiaoji-row";
......@@ -172,9 +209,12 @@ export default {
}
return cname;
},
tableCellClassName({ row, column }) {
tableCellClassName({
row,
column
}) {
if (
row[column.property].toString().indexOf("-") != -1 &&
row[column.property] && row[column.property].toString().indexOf("-") != -1 &&
column.property != "DateStr"
) {
return "warning-col";
......@@ -221,33 +261,45 @@ export default {
});
},
},
};
};
</script>
<style>
@import "../../assets/css/customerManage.css";
@import "../../assets/css/customerManage.css";
.el-table__fixed-body-wrapper table {
.el-table__fixed-body-wrapper table {
padding-bottom: 8px !important;
}
.el-table .xiaoji-row {
}
.el-table .xiaoji-row {
background: #ffff00;
}
}
.el-table .sum-row {
.el-table .sum-row {
background: #00b0f0;
}
.el-table .warning-col {
}
.el-table .warning-col {
background: red;
}
.diy-eltabs .el-tabs__content {
}
.diy-eltabs .el-tabs__content {
height: calc(100% - 40px);
}
.diy-eltabs .data-box-item {
}
.diy-eltabs .data-box-item {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
}
.pointer {
cursor: pointer;
}
.pointer:hover {
color: #00b0f0;
}
</style>
\ No newline at end of file
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