Commit e525831e authored by 罗超's avatar 罗超

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

parents 1a024d62 e91e89a6
<style>
@import '../../assets/css/Record.css';
@import '../../assets/css/Record.css';
</style>
<template>
<div class="Record" id="Record">
<div class="ha-cont" style="justify-content: flex-start; align-items: stretch;" v-for="(item, index) in logList" :key="index">
<div class="ha-cont" style="justify-content: flex-start; align-items: stretch;" v-for="(item, index) in logList"
:key="index">
<div class="ha-circle"></div>
<div class="ha-time">{{item.UpdateDate}}</div>
<!-- <div class="ha-name">admin</div> -->
......@@ -18,52 +18,52 @@
</div>
</div>
</template>
</template>
<script>
export default {
props: ['CustomerId'],
data() {
return {
logList: [],
msg: {
Type: 4,
pageIndex: 1,
pageSize: 10,
SourceId: 0
}
};
},watch:{
},
mounted() {
let $this= this
document
.getElementById("Record")
.addEventListener("scroll", function() {
//全部动态
if (this.scrollHeight - this.scrollTop === this.clientHeight) {
$this.logMsg.pageIndex = $this.logMsg.pageIndex + 1
$this.GetOperationLogPageList(1)
export default {
props: ['CustomerId'],
data() {
return {
logList: [],
msg: {
Type: 4,
pageIndex: 1,
pageSize: 10,
SourceId: 0
}
});
this.msg.SourceId = this.CustomerId
this.GetOperationLogPageList()
},
methods: {
GetOperationLogPageList(t){
this.apipost('/api/Customer/GetOperationLogPageList', this.msg, res=>{
if (res.data.resultCode == 1) {
let data = res.data.data
if (t) {
this.logList = this.logList.concat(
data.pageData
)
} else {
this.logList = data.pageData
};
},
watch: {
},
mounted() {
let $this = this
document
.getElementById("Record")
.addEventListener("scroll", function () {
//全部动态
if (this.scrollHeight - this.scrollTop === this.clientHeight) {
$this.logMsg.pageIndex = $this.logMsg.pageIndex + 1
$this.GetOperationLogPageList(1)
}
}
})
});
this.msg.SourceId = this.CustomerId
this.GetOperationLogPageList()
},
methods: {
GetOperationLogPageList(t) {
this.apipost('/api/Customer/GetOperationLogPageList', this.msg, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
if (t) {
this.logList = this.logList.concat(
data.pageData
)
} else {
this.logList = data.pageData
}
}
})
}
}
}
}
</script>
\ No newline at end of file
......@@ -240,7 +240,6 @@
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType">
......@@ -270,7 +269,6 @@
</div>
</el-col>
</el-row>
<el-col :span="24">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="备注" prop="Remarks">
......@@ -280,7 +278,6 @@
</el-col>
</el-form>
</div>
<div class="form-box" v-if="show">
<el-collapse v-model="activeNames">
<el-collapse-item title="更多信息" name="3">
......@@ -488,7 +485,6 @@
</el-form-item>
</div>
</el-col>
<template v-for='(item,index) in EconomicCapabilityS'>
<el-col :span="8" :key="index" v-if='item.isShow'>
<div class="MyEditForm-item">
......@@ -498,18 +494,13 @@
</div>
</el-col>
</template>
<div class="_addPassengerEconomicCapability">
<span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)"
:class="{_active:item.isShow}">{{item.Name}}</span>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
......@@ -538,7 +529,7 @@
if (!value) {
return callback(new Error("手机号不能为空"));
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/;
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
if (reg.test(value)) {
callback();
} else {
......@@ -640,11 +631,6 @@
message: "请填写客人需求",
trigger: "blur",
}, ],
// Remarks: [{
// required: true,
// message: '请填写备注',
// trigger: 'blur'
// }],
WeChatNo: [{
required: true,
validator: validateWechatAndPhone,
......
<style>
.importDialogBox.add-box .add-tit {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.importDialogBox.add-box .add-tit p {
display: flex;
align-items: center;
font-weight: bold;
color: rgba(17, 17, 17, 1);
font-size: 14px;
}
.importDialogBox.add-box .add-tit p span {
display: inline-block;
width: 6px;
height: 6px;
background: #409efe;
border-radius: 50%;
margin-right: 10px;
}
.importDialogBox.add-box .el-dialog__header {
padding: 15px 20px;
background: rgba(255, 255, 255, 1);
}
.importDialogBox.add-box .dialog-footer {
text-align: center;
background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px;
}
.importDialogBox.add-box .el-dialog__footer {
padding: 0;
}
.importDialogBox.add-box .el-dialog__body {
background-color: rgba(248, 250, 251, 1);
padding-top: 20px;
max-height: 400px;
overflow: auto;
}
.importDialogBox .add-box-btn.el-button {
border-radius: 0;
background-color: #409efecc;
border-color: #409efecc;
color: white;
padding: 12px 43px;
}
.importDialogBox .add-box-btn.el-button:hover {
background-color: #409efe;
border-color: #409efe;
color: white;
}
.importDialogBox .add-box-btn.el-button.add-box-cancel {
color: #409efecc;
background-color: white;
}
.importDialogBox .add-box-btn.el-button.add-box-cancel:hover {
color: #409efe;
background-color: white;
}
.importDialogBox .el-input .el-input-group__append {
background-color: #409efe;
border-color: #409efe;
color: #fff;
}
.importDialogBox .form-box .form-box-tit {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.importDialogBox .form-box .radius {
display: flex;
width: 4px;
height: 4px;
background: rgba(255, 164, 117, 1);
border-radius: 50%;
margin-right: 10px;
}
.importDialogBox .up-img-box .uib-item {
margin-right: 30px;
width: 130px;
height: 130px;
background-color: white;
position: relative;
margin-bottom: 30px;
}
.importDialogBox .up-img-box .uib-item p {
position: absolute;
bottom: -30px;
font-size: 12px;
text-align: center;
width: 100%;
}
.importDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
opacity: 1;
}
.importDialogBox .imgzhe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
}
.importDialogBox .imgzhe .imgzhe-btn {
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
text-align: center;
line-height: 120px;
position: absolute;
top: 0;
opacity: 1;
transition: all linear 0.5s;
}
.importDialogBox .imgzhe .imgzhe-btn i {
font-size: 22px;
margin-right: 5px;
color: white;
cursor: pointer;
}
.importDialogBox .up-ctrl {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.importDialogBox .up-ctrl>div {
width: 100%;
height: 100%;
text-align: center;
line-height: 140px;
}
</style>
<template>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" :close-on-click-modal="false"
class="add-box add-box1 importDialogBox" width="450px" v-loading="loading" :element-loading-text="loadingText">
<div class="add-tit" slot="title">
<p><span></span>{{importType==1?"导入客户线索":"导入直客线索"}}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<p class="form-box-tit"><span class="radius"></span> 上传文件</p>
<div class="up-img-box">
<div class="uib-item" style="margin:0 auto;margin-bottom:20px;">
<div class="up-ctrl">
<el-upload :limit="1" :http-request="UploadClue" :multiple="false" accept="*.xls,*.xlsx"
:show-file-list="false" action="">
<img src="../../assets/img/cust/upimg.png" alt="">
</el-upload>
</div>
<p>
<a :href="downloadUrl" style="cursor:pointer;color:blue;text-decoration:underline;">模板下载</a>
</p>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false">关 闭
</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
importType: {
type: Number,
default: 0,
},
},
data() {
return {
dialogTableVisible: false,
downloadUrl: "",
loading: false,
loadingText: ""
};
},
mounted() {
var fileUrl = "https://imgfile.oytour.com"
if (this.importType == 1) {
this.downloadUrl = fileUrl + "/static/客户模板.xlsx";
} else {
this.downloadUrl = fileUrl + "/static/直客模板.xlsx";
}
let $this = this;
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
},
methods: {
closedDialog() {
this.MsgBus.$emit("closeCustomerDialogBox");
},
//上传线索
UploadClue(file) {
var userInfo = this.getLocalStorage();
var params = {
EmployeeId: userInfo.EmployeeId,
UploadType: this.importType
};
this.loading=true;
this.loadingText="正在上传文件,请稍后...";
this.UploadLocalSystem(params, file.file, (res) => {
this.loading=false;
this.loadingText="";
if (res.data.resultCode == 1) {
this.dialogTableVisible = false;
this.Success("导入线索成功!");
this.$emit("getList");
} else {
this.Error("导入失败!");
}
});
},
},
};
</script>
\ No newline at end of file
<style>
.invalidDialogBox.add-box .add-tit {
display: flex;
justify-content: space-between;
align-items: center;
height: 20px;
}
.invalidDialogBox.add-box .add-tit p {
display: flex;
align-items: center;
font-weight: bold;
color: rgba(17, 17, 17, 1);
font-size: 14px;
}
.invalidDialogBox.add-box .add-tit p span {
display: inline-block;
width: 6px;
height: 6px;
background: #409efe;
border-radius: 50%;
margin-right: 10px;
}
.invalidDialogBox.add-box .el-dialog__header {
padding: 15px 20px;
background: rgba(255, 255, 255, 1);
}
.invalidDialogBox.add-box .dialog-footer {
text-align: center;
background-color: rgba(248, 250, 251, 1);
padding-bottom: 20px;
}
.invalidDialogBox.add-box .el-dialog__footer {
padding: 0;
}
.invalidDialogBox.add-box .el-dialog__body {
background-color: rgba(248, 250, 251, 1);
padding-top: 20px;
max-height: 400px;
overflow: auto;
}
.invalidDialogBox .add-box-btn.el-button {
border-radius: 0;
background-color: #409efecc;
border-color: #409efecc;
color: white;
padding: 12px 43px;
}
.invalidDialogBox .add-box-btn.el-button:hover {
background-color: #409efe;
border-color: #409efe;
color: white;
}
.invalidDialogBox .add-box-btn.el-button.add-box-cancel {
color: #409efecc;
background-color: white;
}
.invalidDialogBox .add-box-btn.el-button.add-box-cancel:hover {
color: #409efe;
background-color: white;
}
.invalidDialogBox .el-input .el-input-group__append {
background-color: #409efe;
border-color: #409efe;
color: #fff;
}
.invalidDialogBox .form-box .form-box-tit {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.invalidDialogBox .form-box .radius {
display: flex;
width: 4px;
height: 4px;
background: rgba(255, 164, 117, 1);
border-radius: 50%;
margin-right: 10px;
}
.invalidDialogBox .up-img-box .uib-item {
margin-right: 30px;
width: 130px;
height: 130px;
background-color: white;
position: relative;
margin-bottom: 30px;
}
.invalidDialogBox .up-img-box .uib-item p {
position: absolute;
bottom: -30px;
font-size: 12px;
text-align: center;
width: 100%;
}
.invalidDialogBox .up-img-box .uib-item:hover .imgzhe-btn {
opacity: 1;
}
.invalidDialogBox .imgzhe {
width: 100%;
height: 100%;
position: absolute;
top: 0;
}
.invalidDialogBox .imgzhe .imgzhe-btn {
background: rgba(0, 0, 0, 0.6);
width: 100%;
height: 100%;
text-align: center;
line-height: 120px;
position: absolute;
top: 0;
opacity: 1;
transition: all linear 0.5s;
}
.invalidDialogBox .imgzhe .imgzhe-btn i {
font-size: 22px;
margin-right: 5px;
color: white;
cursor: pointer;
}
.invalidDialogBox .up-ctrl {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.invalidDialogBox .up-ctrl>div {
width: 100%;
height: 100%;
text-align: center;
line-height: 140px;
}
</style>
<template>
<el-dialog :visible.sync="dialogTableVisible" @closed="closedDialog" class="add-box add-box1 invalidDialogBox"
width="450px" append-to-body>
<div class="add-tit" slot="title">
<p><span></span>无效线索标记</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<el-form ref="form" class="MyEditForm">
<p class="form-box-tit"><span class="radius"></span>
<template v-if="guestInfo">
你正在把线索【{{guestInfo.ClueName}}】,标记为无效
</template>
<template v-else-if="customerInfo">
你正在把线索【{{customerInfo.CustomerName}}】,标记为无效
</template>
</p>
<el-row>
<el-col :span="24">
<div class="MyEditForm-item label-pad-left">
<el-form-item label="无效说明">
<el-input type="textarea" placeholder="无效说明" v-model="saveMsg.Remark"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="SaveInvalid()">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false">关 闭
</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
guestInfo: {
type: Object,
default: null,
},
customerInfo: {
type: Object,
default: null,
},
},
data() {
return {
dialogTableVisible: false,
saveMsg: {
CustomerId: 0,
GueustId: 0,
Remark: "",
ClueState: 2,
ClueName: "", //线索名称
}
};
},
watch: {
},
mounted() {
let $this = this;
setTimeout(() => {
$this.dialogTableVisible = true;
}, 50);
},
methods: {
closedDialog() {
this.MsgBus.$emit("closeInvalidDialogBox");
},
//保存无效线索
SaveInvalid() {
if (this.guestInfo) {
this.saveMsg.GueustId = this.guestInfo.Id;
this.saveMsg.ClueName = this.guestInfo.ClueName;
}
if (this.customerInfo) {
this.saveMsg.CustomerId = this.customerInfo.CustomerId;
this.saveMsg.ClueName = this.customerInfo.CustomerName;
}
this.apipost('/api/Customer/UpdateClueState', this.saveMsg, res => {
if (res.data.resultCode == 1) {
this.$emit("success");
this.dialogTableVisible = false;
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
},
},
};
</script>
\ No newline at end of file
......@@ -82,7 +82,8 @@
<p>{{detailsData.SurName + detailsData.Name}}</p>
</div>
<div class="right" v-if="!hiddenMenu">
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button>
<el-button class="crm-btn query-btn" @click="editCust" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">编辑
</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;" v-if="detailsData.IsCreate==1">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i>
......@@ -121,7 +122,7 @@
<Business v-if="activeName === '5'" :ID="CustomerId" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="订单" name="6">
<Agreement v-if="activeName === '6'" :ID="CustomerId" :detailsData="detailsData" />
<Agreement v-if="activeName === '6'" :ID="CustomerId" :detailsData="detailsData" />
</el-tab-pane>
<el-tab-pane label="财务单据" name="11">
<finance v-if="activeName === '11'" :ID="CustomerId" />
......
This diff is collapsed.
......@@ -17,7 +17,9 @@ export default {
//domainUrl = "http://localhost:5003";
let locationName = window.location.hostname;
//旅游ERPApi
let domainPostUrl = "http://192.168.10.2:8083"
let domainPostUrl = ""
domainPostUrl = "http://192.168.10.2:8083";
//domainPostUrl = "http://192.168.10.46";
if (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com"
......@@ -33,75 +35,17 @@ export default {
DownLoadContractUrl: domainPostUrl,
//阿里服务器地址
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com",
//本站文件流下载地址
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
//PDF文件预览地址
PDFViewUrl: domainUrl + "/plug/pdf/web/viewer.html?file=",
//SocketUrl
WebSocketUrl: "ws://192.168.1.110:8080?account=",
//google地图图片地址
GoogleMapImageUrl: "http://imgfile.oytour.com",
//常用提交数据URL
//CRMApi地址
PostUrl: domainUrl,
PostUrl2: domainPostUrl + "/api/common/post",
//旅游ERPApi地址
ERPApiUrl: domainPostUrl + "/api/common/post",
javaUrl: locationName.indexOf('testb2b') == -1 ? "http://efficient.oytour.com" : locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://47.96.12.235:9001" : "http://192.168.10.215:9000",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.10.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? "http://uploadfile.oytour.com" : "http://192.168.10.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
};
return obj;
},
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().secretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
},
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
//消息成功提示
Vue.prototype.Success = function (msg) {
this.$message({
......@@ -168,18 +112,14 @@ export default {
}
return path.split('?')[0] + '?width=' + w;
}
//打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') {
window.open('http://' + URL, '_blank');
}
}
//旅游ERP接口
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl2;
var apiurl = this.domainManager().ERPApiUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
......@@ -222,6 +162,8 @@ export default {
}
}, faildCall)
}
//CRM接口
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
......@@ -263,6 +205,8 @@ export default {
}
}, faildCall)
},
//Java接口
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
......@@ -312,55 +256,6 @@ export default {
successCall(res)
}
}, faildCall)
},
Vue.prototype.getAction = function (actionId, lineId) {
let msg = {};
msg.actionId = actionId;
if (lineId) {
msg.lineId = lineId;
}
this.apiJavaPost('/api/b2b/home/getSpecialAction', msg, res => {
this.Travelload = false;
if (res.data.resultCode == 1) {
} else {
this.Error(res.data.message);
}
}, null)
}
//验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
if (value.indexOf(".") < 0 && value != "") {
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value = parseFloat(value);
}
item[filed] = value;
}
//验证只能输入整数
Vue.prototype.checkInteger = function (item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(this.$commonUtils.Regex.isInteger, "");
item[filed] = value;
}
}
}
\ 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