Commit e525831e authored by 罗超's avatar 罗超

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

parents 1a024d62 e91e89a6
<style> <style>
@import '../../assets/css/Record.css'; @import '../../assets/css/Record.css';
</style> </style>
<template> <template>
<div class="Record" id="Record"> <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-circle"></div>
<div class="ha-time">{{item.UpdateDate}}</div> <div class="ha-time">{{item.UpdateDate}}</div>
<!-- <div class="ha-name">admin</div> --> <!-- <div class="ha-name">admin</div> -->
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
</div> </div>
</div> </div>
</template> </template>
</template>
<script> <script>
export default { export default {
props: ['CustomerId'], props: ['CustomerId'],
data() { data() {
return { return {
...@@ -32,14 +31,15 @@ export default { ...@@ -32,14 +31,15 @@ export default {
SourceId: 0 SourceId: 0
} }
}; };
},watch:{ },
watch: {
}, },
mounted() { mounted() {
let $this= this let $this = this
document document
.getElementById("Record") .getElementById("Record")
.addEventListener("scroll", function() { .addEventListener("scroll", function () {
//全部动态 //全部动态
if (this.scrollHeight - this.scrollTop === this.clientHeight) { if (this.scrollHeight - this.scrollTop === this.clientHeight) {
$this.logMsg.pageIndex = $this.logMsg.pageIndex + 1 $this.logMsg.pageIndex = $this.logMsg.pageIndex + 1
...@@ -50,8 +50,8 @@ export default { ...@@ -50,8 +50,8 @@ export default {
this.GetOperationLogPageList() this.GetOperationLogPageList()
}, },
methods: { methods: {
GetOperationLogPageList(t){ GetOperationLogPageList(t) {
this.apipost('/api/Customer/GetOperationLogPageList', this.msg, res=>{ this.apipost('/api/Customer/GetOperationLogPageList', this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
if (t) { if (t) {
...@@ -65,5 +65,5 @@ export default { ...@@ -65,5 +65,5 @@ export default {
}) })
} }
} }
} }
</script> </script>
\ No newline at end of file
<style> <style>
@import '../../assets/css/customerManage.css'; @import '../../assets/css/customerManage.css';
/* .tools{
padding-bottom: 0
}
.tools-item{
display: flex;
height: 41px;
}
.tools-item h1{
margin: 0 20px 0 0;
height: 100%;
line-height: 100%;
border-bottom: solid 2px rgba(35, 98, 251, 0);
}
.customerManage .tools h1:last-child{
margin: 0
}
.tools-item .active{
color: rgb(35, 98, 251);
border-color: rgb(35, 98, 251);
} */
.el-table__fixed-body-wrapper table { .el-table__fixed-body-wrapper table {
padding-bottom: 8px !important; padding-bottom: 8px !important;
...@@ -30,8 +10,6 @@ ...@@ -30,8 +10,6 @@
<div class="tools"> <div class="tools">
<div class="tools-item"> <div class="tools-item">
<h1>线索管理</h1> <h1>线索管理</h1>
<!-- <h1 class="cp" :class="[activeMenu === 1 ? 'active' : '']" @click="activeMenu = 1, getList()">客户线索管理</h1>
<h1 class="cp" :class="[activeMenu === 2 ? 'active' : '']" @click="activeMenu = 2">直客线索管理</h1> -->
</div> </div>
<div style="width: 340px;"> <div style="width: 340px;">
<el-input placeholder="请输入线索名称/手机" v-model="msg.CustomerName" class="input-with-select"> <el-input placeholder="请输入线索名称/手机" v-model="msg.CustomerName" class="input-with-select">
...@@ -39,7 +17,6 @@ ...@@ -39,7 +17,6 @@
</el-input> </el-input>
</div> </div>
<div class="rightmenu"> <div class="rightmenu">
<!-- <el-button class="crm-btn query-btn" @click="getList">查询</el-button> -->
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<el-button icon="el-icon-plus" class="crm-btn org-btn">新建线索</el-button> <el-button icon="el-icon-plus" class="crm-btn org-btn">新建线索</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
...@@ -52,7 +29,8 @@ ...@@ -52,7 +29,8 @@
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="3"><i class="iconfont icondaoru"></i> 导入</el-dropdown-item> <el-dropdown-item command="3"><i class="iconfont icondaoru"></i> 导入客户线索</el-dropdown-item>
<el-dropdown-item command="4"><i class="iconfont icondaoru"></i> 导入直客线索</el-dropdown-item>
<!-- <el-dropdown-item><i class="iconfont icondaochu"></i> 导出</el-dropdown-item> --> <!-- <el-dropdown-item><i class="iconfont icondaochu"></i> 导出</el-dropdown-item> -->
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -130,6 +108,16 @@ ...@@ -130,6 +108,16 @@
:height="sceneList.length > 0 ? '600' : '660'" border row-class-name="font-size-12" :height="sceneList.length > 0 ? '600' : '660'" border row-class-name="font-size-12"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="40"></el-table-column> <el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column prop="ClueState" label="线索状态" show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.ClueState==1">
正常
</template>
<template v-else-if="scope.row.ClueState==2">
无效
</template>
</template>
</el-table-column>
<el-table-column prop="ClueName" label="线索名称" v-if="queryType[0].show" show-overflow-tooltip> <el-table-column prop="ClueName" label="线索名称" v-if="queryType[0].show" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp"> <p @click="openDetails(scope)" class="font-color-link cp">
...@@ -139,7 +127,7 @@ ...@@ -139,7 +127,7 @@
<el-table-column prop="CustomerSourceTypeStr" label="线索来源" v-if="queryType[1].show" <el-table-column prop="CustomerSourceTypeStr" label="线索来源" v-if="queryType[1].show"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<!-- CustomerSource 其他的来源 --> <!--CustomerSource其他的来源 -->
<el-table-column prop="SourceAccountName" label="来源细分" <el-table-column prop="SourceAccountName" label="来源细分"
v-if="queryType[2].show && msg.CustomerType === 1" show-overflow-tooltip> v-if="queryType[2].show && msg.CustomerType === 1" show-overflow-tooltip>
</el-table-column> </el-table-column>
...@@ -155,15 +143,13 @@ ...@@ -155,15 +143,13 @@
<el-table-column prop="CustomerName" label="联系人" v-if="queryType[5].show&&msg.CustomerType===1" <el-table-column prop="CustomerName" label="联系人" v-if="queryType[5].show&&msg.CustomerType===1"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="MobilePhone" label="联系电话" sortable v-if="queryType[6].show" <el-table-column prop="ContactNumber" label="联系电话" sortable v-if="queryType[6].show"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="WeChatNo" label="微信号" sortable v-if="queryType[7].show && msg.CustomerType === 1" <el-table-column prop="WeChatNo" label="微信号" sortable v-if="queryType[7].show && msg.CustomerType === 1"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="Address" label="地址" v-if="queryType[4].show" show-overflow-tooltip>
</el-table-column> -->
<el-table-column prop="PersonChargeStr" label="负责人" sortable <el-table-column prop="PersonChargeStr" label="负责人" sortable
v-if="queryType[8].show && msg.CustomerType === 1" show-overflow-tooltip> v-if="queryType[8].show && msg.CustomerType === 1" show-overflow-tooltip>
</el-table-column> </el-table-column>
...@@ -208,13 +194,15 @@ ...@@ -208,13 +194,15 @@
@size-change="handleSizeChange" :total="total"> @size-change="handleSizeChange" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer" direction="rtl" :before-close="handleClose"> <el-drawer :with-header="false" size='70%' :visible.sync="isShowCustomerInfo" direction="rtl"
:before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters" <customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters"
@editCustS="editCust" /> @editCustS="editCust" @getList="getList" />
</el-drawer> </el-drawer>
<el-drawer :with-header="false" size='70%' :visible.sync="drawer2" direction="rtl" :before-close="handleClose"> <el-drawer :with-header="false" size='70%' :visible.sync="isShowGuestInfo" direction="rtl"
:before-close="handleClose">
<guestInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters" <guestInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters"
@editCustS="editCust" /> @editCustS="editCust" @getList="getList" />
</el-drawer> </el-drawer>
<div v-if="dialogTableVisible"> <div v-if="dialogTableVisible">
<customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId" /> <customerDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId" />
...@@ -222,6 +210,10 @@ ...@@ -222,6 +210,10 @@
<div v-if="guestDialogBoxShow"> <div v-if="guestDialogBoxShow">
<guestDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId" /> <guestDialogBox @getList="getList" :name="dialogTableVisibleName" :CustomerId="CustomerId" />
</div> </div>
<!--显示导入弹窗-->
<div v-if="isShowImport">
<importDialogBox @getList="getList" :importType="importType" />
</div>
<el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px" <el-dialog :visible.sync="transferVisible" :close-on-click-modal="false" width="450px"
custom-class="transfer-box add-box add-box2"> custom-class="transfer-box add-box add-box2">
<div class="add-tit" slot="title"> <div class="add-tit" slot="title">
...@@ -252,19 +244,21 @@ ...@@ -252,19 +244,21 @@
import customerDialogBox from "./customerDialogBox"; import customerDialogBox from "./customerDialogBox";
import guestDialogBox from "./guestDialogBox"; import guestDialogBox from "./guestDialogBox";
import guestInfoBox from "./guestInfoBox"; import guestInfoBox from "./guestInfoBox";
import importDialogBox from "./importDialogBox";
export default { export default {
components: { components: {
mySelect, mySelect,
customerInfoBox, customerInfoBox,
customerDialogBox, customerDialogBox,
guestDialogBox, guestDialogBox,
guestInfoBox guestInfoBox,
importDialogBox,
}, },
data() { data() {
return { return {
ruleList: [], ruleList: [],
guestDialogBoxShow: false, guestDialogBoxShow: false,
drawer2: false, isShowGuestInfo: false, //是否显示直客弹窗
activeMenu: 1, activeMenu: 1,
queryType2: [{ queryType2: [{
label: '线索名称', label: '线索名称',
...@@ -344,7 +338,7 @@ ...@@ -344,7 +338,7 @@
CustomerIdStr: '', CustomerIdStr: '',
transferVisible: false, transferVisible: false,
mySelectCtrl: false, mySelectCtrl: false,
drawer: false, isShowCustomerInfo: false, //是否显示客户弹窗
loading: true, loading: true,
dialogTableVisible: false, dialogTableVisible: false,
dialogTableVisibleName: '新建线索', dialogTableVisibleName: '新建线索',
...@@ -402,6 +396,8 @@ ...@@ -402,6 +396,8 @@
SceneEmployeeList: [], SceneEmployeeList: [],
sceneID: 29, sceneID: 29,
visible: false, visible: false,
isShowImport: false, //是否显示导入弹窗
importType: 1, //导入文件类型(1-客户导入,2-直客导入)
}; };
}, },
mounted() { mounted() {
...@@ -410,8 +406,9 @@ ...@@ -410,8 +406,9 @@
this.Employee() this.Employee()
let $this = this let $this = this
this.MsgBus.$on('closeCustomerDialogBox', function () { this.MsgBus.$on('closeCustomerDialogBox', function () {
$this.dialogTableVisible = false $this.dialogTableVisible = false;
$this.guestDialogBoxShow = false $this.guestDialogBoxShow = false;
$this.isShowImport = false;
}) })
this.GetSceneEmployeeList() this.GetSceneEmployeeList()
this.MsgBus.$on('sceneSave', function (msg) { this.MsgBus.$on('sceneSave', function (msg) {
...@@ -467,7 +464,11 @@ ...@@ -467,7 +464,11 @@
} else if (command === '2') { } else if (command === '2') {
this.guestDialogBoxShow = true this.guestDialogBoxShow = true
} else if (command === '3') { } else if (command === '3') {
this.$message.warning('功能正在开发中~'); this.importType = 1;
this.isShowImport = true;
} else if (command === '4') {
this.importType = 2;
this.isShowImport = true;
} }
}, },
Employee() { Employee() {
...@@ -491,7 +492,6 @@ ...@@ -491,7 +492,6 @@
}, },
//删除 //删除
deleteClue(type) { deleteClue(type) {
let tips = '确定将这些线索删除?' let tips = '确定将这些线索删除?'
if (type === 1) { if (type === 1) {
tips = '是否把线索“' + this.CustomerName + '”删除?' tips = '是否把线索“' + this.CustomerName + '”删除?'
...@@ -511,8 +511,8 @@ ...@@ -511,8 +511,8 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (type === 1) {} { if (type === 1) {} {
this.drawer = false this.isShowCustomerInfo = false
this.drawer2 = false this.isShowGuestInfo = false
} }
this.multipleSelection = [] this.multipleSelection = []
this.$message.success(res.data.message); this.$message.success(res.data.message);
...@@ -530,11 +530,7 @@ ...@@ -530,11 +530,7 @@
export () { export () {
}, },
// 更改状态 //转换为客户
changeState() {
},
// 转换为客户
waters(type) { waters(type) {
let tips = '确定将这些线索转换为客户吗?' let tips = '确定将这些线索转换为客户吗?'
if (type === 1) { if (type === 1) {
...@@ -557,8 +553,8 @@ ...@@ -557,8 +553,8 @@
this.apipost('/api/Customer/UpdateCustomerClue', msg, res => { this.apipost('/api/Customer/UpdateCustomerClue', msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (type === 1) {} { if (type === 1) {} {
this.drawer = false this.isShowCustomerInfo = false
this.drawer2 = false this.isShowGuestInfo = false
} }
this.multipleSelection = [] this.multipleSelection = []
this.$message.success(res.data.message); this.$message.success(res.data.message);
...@@ -633,8 +629,8 @@ ...@@ -633,8 +629,8 @@
this.multipleSelection = [] this.multipleSelection = []
this.transferVisible = false this.transferVisible = false
if (type === 3) {} { if (type === 3) {} {
this.drawer = false this.isShowCustomerInfo = false
this.drawer2 = false this.isShowGuestInfo = false
} }
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.getList() this.getList()
...@@ -665,9 +661,9 @@ ...@@ -665,9 +661,9 @@
this.CustomerId = scope.row.CustomerId this.CustomerId = scope.row.CustomerId
this.CustomerName = scope.row.CustomerName this.CustomerName = scope.row.CustomerName
if (this.msg.CustomerType === 0) { if (this.msg.CustomerType === 0) {
this.drawer = true this.isShowCustomerInfo = true
} else { } else {
this.drawer2 = true this.isShowGuestInfo = true
} }
}, },
// 获取是否开启规则 // 获取是否开启规则
...@@ -677,7 +673,6 @@ ...@@ -677,7 +673,6 @@
this.ruleList = res.data.data.EmpList this.ruleList = res.data.data.EmpList
} }
}) })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.msg.pageSize = val this.msg.pageSize = val
...@@ -704,7 +699,6 @@ ...@@ -704,7 +699,6 @@
// 获取是否开启规则 // 获取是否开启规则
this.GetCustomerAllotRule() this.GetCustomerAllotRule()
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val.map(x => this.multipleSelection = val.map(x =>
......
<style> <style>
.drawer-box{ .drawer-box {
height: 100%; height: 100%;
} }
.drawer-header{
.drawer-header {
height: 83px; height: 83px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 30px; padding: 0 30px;
} }
.drawer-header .left{
.drawer-header .left {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.drawer-header .left img{
.drawer-header .left img {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
.drawer-body{
height: calc( 100% - 83px); .drawer-body {
} height: calc(100% - 83px);
.drawer-body .top-info{ }
.drawer-body .top-info {
height: 115px; height: 115px;
padding: 30px; padding: 30px;
box-sizing: border-box; box-sizing: border-box;
font-size: 12px; font-size: 12px;
background-color: #F6F4FC; background-color: #F6F4FC;
} }
.drawer-body .top-info .info-lable{
.drawer-body .top-info .info-lable {
display: inline-block; display: inline-block;
width: 80px; width: 80px;
color: #999999; color: #999999;
} }
.margin-bottom-25{
.margin-bottom-25 {
margin-bottom: 25px; margin-bottom: 25px;
} }
.drawer-box .el-tabs__nav-wrap::after{
.drawer-box .el-tabs__nav-wrap::after {
height: 0; height: 0;
} }
.drawer-body .el-tabs__header{
.drawer-body .el-tabs__header {
padding: 0 25px; padding: 0 25px;
margin-bottom: 0; margin-bottom: 0;
} }
.drawer-body>.content{
.drawer-body>.content {
height: calc(100% - 115px); height: calc(100% - 115px);
} }
.drawer-body .el-tabs{
.drawer-body .el-tabs {
height: 100%; height: 100%;
} }
.drawer-body .el-tabs__content{
.drawer-body .el-tabs__content {
background-color: #F6F4FC; background-color: #F6F4FC;
height: calc(100% - 40px); height: calc(100% - 40px);
box-sizing: border-box; box-sizing: border-box;
} }
.drawer-body .el-tabs__content .el-tab-pane{
.drawer-body .el-tabs__content .el-tab-pane {
height: 100%; height: 100%;
position: absolute; position: absolute;
width: calc(100%); width: calc(100%);
padding: 17px 20px; padding: 17px 20px;
box-sizing: border-box box-sizing: border-box
} }
</style> </style>
<template> <template>
<div class="drawer-box" v-if="loading"> <div class="drawer-box" v-if="loading">
...@@ -69,15 +82,17 @@ ...@@ -69,15 +82,17 @@
<p>{{detailsData.CustomerName}}</p> <p>{{detailsData.CustomerName}}</p>
</div> </div>
<div class="right"> <div class="right">
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button> <el-button class="crm-btn query-btn" @click="editCustomerInfo">编辑</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;"> <el-dropdown @command="handleCommand" style="top: 1px;">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item> <el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item>
<el-dropdown-item command="g"><i class="iconfont icongonghaiguanli"></i> 转化为客户</el-dropdown-item> <el-dropdown-item command="g"><i class="iconfont icongonghaiguanli"></i> 转化为客户
</el-dropdown-item>
<el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item> <el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item>
<el-dropdown-item command="w"><i class="iconfont icondelete"></i> 无效线索</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
...@@ -89,7 +104,7 @@ ...@@ -89,7 +104,7 @@
<span class="info-lable">客户级别:</span><span>{{detailsData.CustomerIdLevelStr}}</span> <span class="info-lable">客户级别:</span><span>{{detailsData.CustomerIdLevelStr}}</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<span class="info-lable">成交状态:</span><span >已成交</span> <span class="info-lable">成交状态:</span><span>已成交</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -107,32 +122,35 @@ ...@@ -107,32 +122,35 @@
<Activity v-if="activeName === '1'" :CustomerId="CustomerId" /> <Activity v-if="activeName === '1'" :CustomerId="CustomerId" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="详细资料" name="2"> <el-tab-pane label="详细资料" name="2">
<Details v-if="activeName === '2'" :detailsData="detailsData"/> <Details v-if="activeName === '2'" :detailsData="detailsData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure v-if="activeName === '8'" :ID='CustomerId' :type='1'/> <Enclosure v-if="activeName === '8'" :ID='CustomerId' :type='1' />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" :CustomerId="CustomerId"/> <Record v-if="activeName === '9'" :CustomerId="CustomerId" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
<invalidDialogBox v-if="isShowInvalidBox" :customerInfo="detailsData" @success="refreshParentPage" />
</div> </div>
</template> </template>
<script> <script>
import Activity from "./Activity"; import Activity from "./Activity";
import Details from "./Details"; import Details from "./Details";
import Enclosure from "./Enclosure"; import Enclosure from "./Enclosure";
import Record from "./Record"; import Record from "./Record";
export default { import invalidDialogBox from "./invalidDialogBox";
export default {
components: { components: {
Activity, Activity,
Details, Details,
Enclosure, Enclosure,
Record Record,
invalidDialogBox
}, },
props:{ props: {
CustomerId: { CustomerId: {
type: Number, type: Number,
default: 0 default: 0
...@@ -143,14 +161,16 @@ export default { ...@@ -143,14 +161,16 @@ export default {
activeName: '1', activeName: '1',
detailsData: {}, detailsData: {},
loading: false, loading: false,
isShowInvalidBox: false,
}; };
},watch:{ },
watch: {
CustomerId: { CustomerId: {
handler(val, oldVal){ handler(val, oldVal) {
this.init() this.init()
this.activeName = '1' this.activeName = '1'
}, },
deep:true deep: true
} }
}, },
mounted() { mounted() {
...@@ -160,37 +180,47 @@ export default { ...@@ -160,37 +180,47 @@ export default {
this.MsgBus.$on('RefreshInfoBox', function () { this.MsgBus.$on('RefreshInfoBox', function () {
$this.init() $this.init()
}) })
//关闭无效线索弹窗
this.MsgBus.$on('closeInvalidDialogBox', function () {
$this.isShowInvalidBox = false;
})
}, },
methods: { methods: {
init(){ //刷新父页面
this.apipost('/api/Customer/GetAllCustmersModel', {CustomerId: this.CustomerId}, res=>{ refreshParentPage() {
this.$emit('getList')
},
init() {
this.apipost('/api/Customer/GetAllCustmersModel', {
CustomerId: this.CustomerId
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
if(!data.HousePhotos){ if (!data.HousePhotos) {
data.HousePhotos = [] data.HousePhotos = []
} }
if(!data.BusinessCardPhotos){ if (!data.BusinessCardPhotos) {
data.BusinessCardPhotos = [] data.BusinessCardPhotos = []
} }
if(!data.Images){ if (!data.Images) {
data.Images = [] data.Images = []
} }
if(!data.CustomerSourceType){ if (!data.CustomerSourceType) {
data.CustomerSourceType = '' data.CustomerSourceType = ''
} }
if(!data.CustomerSource){ if (!data.CustomerSource) {
data.CustomerSource = '' data.CustomerSource = ''
} }
if(!data.Province){ if (!data.Province) {
data.Province = '' data.Province = ''
} }
if(!data.Country){ if (!data.Country) {
data.Country = '' data.Country = ''
} }
if(!data.City){ if (!data.City) {
data.City = '' data.City = ''
} }
if(!data.District){ if (!data.District) {
data.District = '' data.District = ''
} }
this.detailsData = data this.detailsData = data
...@@ -198,7 +228,7 @@ export default { ...@@ -198,7 +228,7 @@ export default {
} }
}) })
}, },
handleCommand(command){ handleCommand(command) {
if (command === 'z') { if (command === 'z') {
this.$emit('transferS', 3); this.$emit('transferS', 3);
} else if (command === 'g') { } else if (command === 'g') {
...@@ -206,14 +236,19 @@ export default { ...@@ -206,14 +236,19 @@ export default {
} else if (command === 'd') { } else if (command === 'd') {
this.$emit('deleteClue', 1) this.$emit('deleteClue', 1)
} }
//无效线索弹窗
else if (command === 'w') {
this.isShowInvalidBox = true;
}
}, },
handleClick(tab, event) {}, handleClick(tab, event) {},
editCust(){ //编辑客户信息
editCustomerInfo() {
this.$emit('editCustS', 1) this.$emit('editCustS', 1)
}, },
handleClose(done) { handleClose(done) {
done(); done();
} }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -240,7 +240,6 @@ ...@@ -240,7 +240,6 @@
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="MyEditForm-item"> <div class="MyEditForm-item">
<el-form-item label="客户来源" prop="CustomerSourceType"> <el-form-item label="客户来源" prop="CustomerSourceType">
...@@ -270,7 +269,6 @@ ...@@ -270,7 +269,6 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-col :span="24"> <el-col :span="24">
<div class="MyEditForm-item label-pad-left"> <div class="MyEditForm-item label-pad-left">
<el-form-item label="备注" prop="Remarks"> <el-form-item label="备注" prop="Remarks">
...@@ -280,7 +278,6 @@ ...@@ -280,7 +278,6 @@
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
<div class="form-box" v-if="show"> <div class="form-box" v-if="show">
<el-collapse v-model="activeNames"> <el-collapse v-model="activeNames">
<el-collapse-item title="更多信息" name="3"> <el-collapse-item title="更多信息" name="3">
...@@ -488,7 +485,6 @@ ...@@ -488,7 +485,6 @@
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<template v-for='(item,index) in EconomicCapabilityS'> <template v-for='(item,index) in EconomicCapabilityS'>
<el-col :span="8" :key="index" v-if='item.isShow'> <el-col :span="8" :key="index" v-if='item.isShow'>
<div class="MyEditForm-item"> <div class="MyEditForm-item">
...@@ -498,18 +494,13 @@ ...@@ -498,18 +494,13 @@
</div> </div>
</el-col> </el-col>
</template> </template>
<div class="_addPassengerEconomicCapability"> <div class="_addPassengerEconomicCapability">
<span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)" <span v-for="(item, index) in EconomicCapabilityS" :key="index" @click="addEconomicCapability(item)"
:class="{_active:item.isShow}">{{item.Name}}</span> :class="{_active:item.isShow}">{{item.Name}}</span>
</div> </div>
</el-form> </el-form>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button> <el-button type="primary" class="add-box-btn" @click="submitForm('form')">确 定</el-button>
...@@ -538,7 +529,7 @@ ...@@ -538,7 +529,7 @@
if (!value) { if (!value) {
return callback(new Error("手机号不能为空")); return callback(new Error("手机号不能为空"));
} else { } 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)) { if (reg.test(value)) {
callback(); callback();
} else { } else {
...@@ -640,11 +631,6 @@ ...@@ -640,11 +631,6 @@
message: "请填写客人需求", message: "请填写客人需求",
trigger: "blur", trigger: "blur",
}, ], }, ],
// Remarks: [{
// required: true,
// message: '请填写备注',
// trigger: 'blur'
// }],
WeChatNo: [{ WeChatNo: [{
required: true, required: true,
validator: validateWechatAndPhone, validator: validateWechatAndPhone,
......
<style> <style>
.drawer-box{ .drawer-box {
height: 100%; height: 100%;
} }
.drawer-header{
.drawer-header {
height: 83px; height: 83px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 30px; padding: 0 30px;
} }
.drawer-header .left{
.drawer-header .left {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.drawer-header .left img{
.drawer-header .left img {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
.drawer-body{
height: calc( 100% - 83px); .drawer-body {
} height: calc(100% - 83px);
.drawer-body .top-info{ }
.drawer-body .top-info {
height: 115px; height: 115px;
padding: 30px; padding: 30px;
box-sizing: border-box; box-sizing: border-box;
font-size: 12px; font-size: 12px;
background-color: #F6F4FC; background-color: #F6F4FC;
} }
.drawer-body .top-info .info-lable{
.drawer-body .top-info .info-lable {
display: inline-block; display: inline-block;
width: 80px; width: 80px;
color: #999999; color: #999999;
} }
.margin-bottom-25{
.margin-bottom-25 {
margin-bottom: 25px; margin-bottom: 25px;
} }
.drawer-box .el-tabs__nav-wrap::after{
.drawer-box .el-tabs__nav-wrap::after {
height: 0; height: 0;
} }
.drawer-body .el-tabs__header{
.drawer-body .el-tabs__header {
padding: 0 25px; padding: 0 25px;
margin-bottom: 0; margin-bottom: 0;
} }
.drawer-body>.content{
.drawer-body>.content {
height: calc(100% - 115px); height: calc(100% - 115px);
} }
.drawer-body .el-tabs{
.drawer-body .el-tabs {
height: 100%; height: 100%;
} }
.drawer-body .el-tabs__content{
.drawer-body .el-tabs__content {
background-color: #F6F4FC; background-color: #F6F4FC;
height: calc(100% - 40px); height: calc(100% - 40px);
box-sizing: border-box; box-sizing: border-box;
} }
.drawer-body .el-tabs__content .el-tab-pane{
.drawer-body .el-tabs__content .el-tab-pane {
height: 100%; height: 100%;
position: absolute; position: absolute;
width: calc(100%); width: calc(100%);
padding: 17px 20px; padding: 17px 20px;
box-sizing: border-box box-sizing: border-box
} }
</style> </style>
<template> <template>
<div class="drawer-box" v-if="loading"> <div class="drawer-box" v-if="loading">
...@@ -69,14 +82,15 @@ ...@@ -69,14 +82,15 @@
<p>{{detailsData.GusetName}}</p> <p>{{detailsData.GusetName}}</p>
</div> </div>
<div class="right"> <div class="right">
<el-button class="crm-btn query-btn" @click="editCust" >编辑</el-button> <el-button class="crm-btn query-btn" @click="editGuestInfo">编辑</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;" > <el-dropdown @command="handleCommand" style="top: 1px;">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item> <el-dropdown-item command="z"><i class="iconfont iconplus-transfer"></i> 转移</el-dropdown-item>
<el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item> <el-dropdown-item command="d"><i class="iconfont icondelete"></i> 删除</el-dropdown-item>
<el-dropdown-item command="w"><i class="iconfont icondelete"></i> 无效线索</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
...@@ -88,7 +102,8 @@ ...@@ -88,7 +102,8 @@
<span class="info-lable">客户级别:</span><span>{{detailsData.CustomerIdLevelStr}}</span> <span class="info-lable">客户级别:</span><span>{{detailsData.CustomerIdLevelStr}}</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<span class="info-lable">创建时间:</span><span>{{detailsData.CreateDate ? detailsData.CreateDate : ''}}</span> <span
class="info-lable">创建时间:</span><span>{{detailsData.CreateDate ? detailsData.CreateDate : ''}}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -96,42 +111,47 @@ ...@@ -96,42 +111,47 @@
<span class="info-lable">负责人:</span><span>{{detailsData.PersonChargeStr}}</span> <span class="info-lable">负责人:</span><span>{{detailsData.PersonChargeStr}}</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<span class="info-lable">更新时间:</span><span>{{detailsData.UpdateTime ? detailsData.UpdateTime : ''}}</span> <span
class="info-lable">更新时间:</span><span>{{detailsData.UpdateTime ? detailsData.UpdateTime : ''}}</span>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="content"> <div class="content">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="活动" name="1"> <el-tab-pane label="活动" name="1">
<Activity v-if="activeName === '1'" :CustomerId="CustomerId" :showType="2"/> <Activity v-if="activeName === '1'" :CustomerId="CustomerId" :showType="2"
:detailsData="detailsData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="详细资料" name="2"> <el-tab-pane label="详细资料" name="2">
<Details v-if="activeName === '2'" :detailsData="detailsData"/> <Details v-if="activeName === '2'" :detailsData="detailsData" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="附件" name="8"> <el-tab-pane label="附件" name="8">
<Enclosure :ID='CustomerId' :type='1' :isGuest="true" v-if="activeName === '8'"/> <Enclosure :ID='CustomerId' :type='1' :isGuest="true" v-if="activeName === '8'" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作记录" name="9"> <el-tab-pane label="操作记录" name="9">
<Record v-if="activeName === '9'" :CustomerId="CustomerId"/> <Record v-if="activeName === '9'" :CustomerId="CustomerId" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<invalidDialogBox v-if="isShowInvalidBox" :guestInfo="detailsData" @success="refreshParentPage" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Activity from "../guestManagement/Activity"; import Activity from "../guestManagement/Activity";
import Details from "../guestManagement/Details"; import Details from "../guestManagement/Details";
import Enclosure from "../clueManagement/Enclosure"; import Enclosure from "../clueManagement/Enclosure";
import Record from "../guestManagement/Record"; import Record from "../guestManagement/Record";
export default { import invalidDialogBox from "./invalidDialogBox";
export default {
components: { components: {
Activity, Activity,
Details, Details,
Enclosure, Enclosure,
Record Record,
invalidDialogBox
}, },
props:{ props: {
CustomerId: { CustomerId: {
type: Number, type: Number,
default: 0 default: 0
...@@ -142,14 +162,16 @@ export default { ...@@ -142,14 +162,16 @@ export default {
activeName: '1', activeName: '1',
detailsData: {}, detailsData: {},
loading: false, loading: false,
isShowInvalidBox: false, //是否显示无效线索弹窗
}; };
},watch:{ },
watch: {
CustomerId: { CustomerId: {
handler(val, oldVal){ handler(val, oldVal) {
this.init() this.init()
this.activeName = '1' this.activeName = '1'
}, },
deep:true deep: true
} }
}, },
mounted() { mounted() {
...@@ -159,37 +181,46 @@ export default { ...@@ -159,37 +181,46 @@ export default {
this.MsgBus.$on('RefreshInfoBox', function () { this.MsgBus.$on('RefreshInfoBox', function () {
$this.init() $this.init()
}) })
this.MsgBus.$on('closeInvalidDialogBox', function () {
$this.isShowInvalidBox = false;
})
}, },
methods: { methods: {
init(){ //刷新父页面
this.apipost('/api/Customer/GetAllGuesstCustomerModel', {ID: this.CustomerId}, res=>{ refreshParentPage() {
this.$emit('getList')
},
init() {
this.apipost('/api/Customer/GetAllGuesstCustomerModel', {
ID: this.CustomerId
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data
if(!data.HousePhotos){ if (!data.HousePhotos) {
data.HousePhotos = [] data.HousePhotos = []
} }
if(!data.BusinessCardPhotos){ if (!data.BusinessCardPhotos) {
data.BusinessCardPhotos = [] data.BusinessCardPhotos = []
} }
if(!data.Images){ if (!data.Images) {
data.Images = [] data.Images = []
} }
if(!data.CustomerSourceType){ if (!data.CustomerSourceType) {
data.CustomerSourceType = '' data.CustomerSourceType = ''
} }
if(!data.CustomerSource){ if (!data.CustomerSource) {
data.CustomerSource = '' data.CustomerSource = ''
} }
if(!data.Province){ if (!data.Province) {
data.Province = '' data.Province = ''
} }
if(!data.Country){ if (!data.Country) {
data.Country = '' data.Country = ''
} }
if(!data.City){ if (!data.City) {
data.City = '' data.City = ''
} }
if(!data.District){ if (!data.District) {
data.District = '' data.District = ''
} }
this.detailsData = data this.detailsData = data
...@@ -197,20 +228,25 @@ export default { ...@@ -197,20 +228,25 @@ export default {
} }
}) })
}, },
handleCommand(command){ handleCommand(command) {
if (command === 'z') { if (command === 'z') {
this.$emit('transferS', 3); this.$emit('transferS', 3);
} else if (command === 'g') { } else if (command === 'g') {
} }
//无效线索弹窗
else if (command === 'w') {
this.isShowInvalidBox = true;
}
}, },
handleClick(tab, event) {}, handleClick(tab, event) {},
editCust(){ //编辑直客信息
editGuestInfo() {
this.$emit('editCustS', 2) this.$emit('editCustS', 2)
}, },
handleClose(done) { handleClose(done) {
done(); done();
} }
} }
} }
</script> </script>
\ No newline at end of file
<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 @@ ...@@ -82,7 +82,8 @@
<p>{{detailsData.SurName + detailsData.Name}}</p> <p>{{detailsData.SurName + detailsData.Name}}</p>
</div> </div>
<div class="right" v-if="!hiddenMenu"> <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-dropdown @command="handleCommand" style="top: 1px;" v-if="detailsData.IsCreate==1">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0"> <el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i> <i class="iconfont icongengduo"></i>
......
...@@ -16,56 +16,39 @@ import languageUtils from './assets/utils/languageUtils' //引入语言转换帮 ...@@ -16,56 +16,39 @@ import languageUtils from './assets/utils/languageUtils' //引入语言转换帮
import moment from 'moment' import moment from 'moment'
import co from 'co' import co from 'co'
import MsgBus from './plugins/event-bus' import MsgBus from './plugins/event-bus'
import { location } from "./assets/utils/getLocation" import {
location
} from "./assets/utils/getLocation"
import 'xe-utils' import 'xe-utils'
import vueQuillEditor from 'vue-quill-editor' import vueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
import pinyin from 'pinyin' import pinyin from 'pinyin'
Vue.prototype.pinyin = pinyin Vue.prototype.pinyin = pinyin
// import VXETable from 'vxe-table'
// import 'vxe-table/lib/index.css'
// import tinymce from 'tinymce/tinymce'
// import Editor from '@tinymce/tinymce-vue'
// import 'tinymce/themes/silver'
// 使用Vue.use()方法就会调用工具方法中的install方法 // 使用Vue.use()方法就会调用工具方法中的install方法
Vue.use(htmlToPdf) Vue.use(htmlToPdf)
Vue.use(VueLazyload) Vue.use(VueLazyload)
// Vue.use(VXETable)
Vue.use(vueQuillEditor) Vue.use(vueQuillEditor)
// Vue.use(VueLazyload, {
// preLoad: 1.3,
// error: '../src/assets/img/banner@3x.png',
// loading: '../src/assets/img/loader.gif',
// attempt: 1
// })
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(plug) Vue.use(plug)
Vue.http = Vue.prototype.$http = axios Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils Vue.commonUtils = Vue.prototype.$commonUtils = commonUtils
Vue.languageUtils=Vue.prototype.$languageUtils=languageUtils Vue.languageUtils = Vue.prototype.$languageUtils = languageUtils
Vue.prototype.MsgBus = MsgBus Vue.prototype.MsgBus = MsgBus
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
String.prototype.IsPicture = function() { String.prototype.IsPicture = function () {
//判断是否是图片 - strFilter必须是小写列举 //判断是否是图片 - strFilter必须是小写列举
var strFilter=".jpeg|.gif|.jpg|.png|.bmp|.pic|" var strFilter = ".jpeg|.gif|.jpg|.png|.bmp|.pic|"
if(this.indexOf(".")>-1) if (this.indexOf(".") > -1) {
{
var p = this.lastIndexOf("."); var p = this.lastIndexOf(".");
//alert(p); var strPostfix = this.substring(p, this.length) + '|';
//alert(this.length);
var strPostfix=this.substring(p,this.length) + '|';
strPostfix = strPostfix.toLowerCase(); strPostfix = strPostfix.toLowerCase();
//alert(strPostfix); if (strFilter.indexOf(strPostfix) > -1) {
if(strFilter.indexOf(strPostfix)>-1)
{
//alert("True");
return true; return true;
} }
} }
//alert('False');
return false; return false;
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
...@@ -75,12 +58,12 @@ router.beforeEach((to, from, next) => { ...@@ -75,12 +58,12 @@ router.beforeEach((to, from, next) => {
} }
sessionStorage.setItem("FromPath", JSON.stringify(msg)); sessionStorage.setItem("FromPath", JSON.stringify(msg));
if (to.meta.title) { if (to.meta.title) {
if(localStorage.g && localStorage.g!='undefined'){ if (localStorage.g && localStorage.g != 'undefined') {
if(JSON.parse(localStorage.g).i!=2) if (JSON.parse(localStorage.g).i != 2)
document.title = to.meta.title.split('-')[0]+'-'+JSON.parse(localStorage.g).n document.title = to.meta.title.split('-')[0] + '-' + JSON.parse(localStorage.g).n
else else
document.title = to.meta.title document.title = to.meta.title
}else{ } else {
document.title = to.meta.title document.title = to.meta.title
} }
} }
...@@ -95,6 +78,7 @@ Vue.prototype.getLocalStorage = function () { ...@@ -95,6 +78,7 @@ Vue.prototype.getLocalStorage = function () {
return null; return null;
} }
} }
Vue.prototype.getNowDate = function () { Vue.prototype.getNowDate = function () {
var date = new Date(); var date = new Date();
var seperator1 = "-"; var seperator1 = "-";
...@@ -107,9 +91,9 @@ Vue.prototype.getNowDate = function () { ...@@ -107,9 +91,9 @@ Vue.prototype.getNowDate = function () {
if (strDate >= 0 && strDate <= 9) { if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate; strDate = "0" + strDate;
} }
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate +
+ " " + date.getHours() + seperator2 + date.getMinutes() " " + date.getHours() + seperator2 + date.getMinutes() +
+ seperator2 + date.getSeconds(); seperator2 + date.getSeconds();
return currentdate; return currentdate;
} }
Vue.prototype.DateDiff = function (sDate1, sDate2) { Vue.prototype.DateDiff = function (sDate1, sDate2) {
...@@ -118,10 +102,11 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) { ...@@ -118,10 +102,11 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) {
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
aDate = sDate2.split("-") aDate = sDate2.split("-")
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数 iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
return iDays return iDays
} }
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
//价钱格式化,三位数逗号分隔,保留两位小数
Vue.prototype.moneyFormat = function (value) { Vue.prototype.moneyFormat = function (value) {
if (!value) { if (!value) {
return 0.00 return 0.00
...@@ -137,8 +122,9 @@ Vue.prototype.moneyFormat = function (value) { ...@@ -137,8 +122,9 @@ Vue.prototype.moneyFormat = function (value) {
} }
return x1 + x2; return x1 + x2;
}, },
// 注册 // 注册
Vue.filter('priceFormat', function (value) { Vue.filter('priceFormat', function (value) {
if (value == null) { if (value == null) {
return 0.00; return 0.00;
} }
...@@ -152,16 +138,15 @@ Vue.filter('priceFormat', function (value) { ...@@ -152,16 +138,15 @@ Vue.filter('priceFormat', function (value) {
x1 = x1.replace(rgx, '$1' + ',' + '$2'); x1 = x1.replace(rgx, '$1' + ',' + '$2');
} }
return x1 + x2; return x1 + x2;
}) })
// 不要小数点
Vue.filter('NoDesnum', function (value) { // 不要小数点
Vue.filter('NoDesnum', function (value) {
if (value == null) { if (value == null) {
return 0.00; return 0.00;
} } else if (value < 1) {
else if(value<1){
return value; return value;
} } else {
else{
let nStr = Number(value).toFixed(0) let nStr = Number(value).toFixed(0)
nStr += ''; nStr += '';
let x = nStr.split('.'); let x = nStr.split('.');
...@@ -177,15 +162,17 @@ Vue.filter('priceFormat', function (value) { ...@@ -177,15 +162,17 @@ Vue.filter('priceFormat', function (value) {
}) })
// 时间格式YYYY-MM-DD // 时间格式YYYY-MM-DD
Vue.filter("YMD", function (date) { Vue.filter("YMD", function (date) {
return moment(date).format("YYYY-MM-DD"); return moment(date).format("YYYY-MM-DD");
}) })
Vue.filter("MD", function (date) { Vue.filter("MD", function (date) {
return moment(date).format("MM月DD日"); return moment(date).format("MM月DD日");
}) })
Vue.filter("YMDHMS", function (date) { Vue.filter("YMDHMS", function (date) {
return moment(date).format("YYYY-MM-DD HH:mm:ss"); return moment(date).format("YYYY-MM-DD HH:mm:ss");
}) })
Vue.prototype.random_string = function (len) { Vue.prototype.random_string = function (len) {
len = len || 32; len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
...@@ -195,9 +182,10 @@ Vue.prototype.random_string = function (len) { ...@@ -195,9 +182,10 @@ Vue.prototype.random_string = function (len) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos)); pwd += chars.charAt(Math.floor(Math.random() * maxPos));
} }
return pwd; return pwd;
}, },
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) { //上传文件到文件服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
if (files && files.length > 0) { if (files && files.length > 0) {
let nameList = new Array() let nameList = new Array()
for (let index = 0; index < files.length; index++) { for (let index = 0; index < files.length; index++) {
...@@ -222,6 +210,75 @@ Vue.prototype.UploadSelfFileT = function (path, files, successCall) { ...@@ -222,6 +210,75 @@ Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
} }
} }
/**
* 上传到当前Api站点
* @param params 上传需要携带信息
* @param fileObj 上传文件信息
* @param successCall 回调函数
*/
Vue.prototype.UploadLocalSystem = function (params, fileObj, successCall) {
let that = this;
let url = that.domainManager().PostUrl+"/api/Upload/Index";
let formData = new FormData()
if (params) {
formData.append("params", JSON.stringify(params));
}
formData.append('myfile', fileObj);
co(function* () {
that.$http.post(url, formData, {})
.then(res => {
successCall(res);
})
}).catch(function (err) {
console.log("上传文件出错" + err);
});
}
//新页面打开页面
Vue.prototype.OpenNewUrl = function (path, queryObj) {
var newUrl = this.$router.resolve({
path: path,
query: queryObj
});
window.open(newUrl.href, '_blank');
}
//验证只能输入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;
}
new Vue({ new Vue({
router, router,
store, store,
......
...@@ -17,7 +17,9 @@ export default { ...@@ -17,7 +17,9 @@ export default {
//domainUrl = "http://localhost:5003"; //domainUrl = "http://localhost:5003";
let locationName = window.location.hostname; let locationName = window.location.hostname;
//旅游ERPApi //旅游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 (this.isOnline()) {
if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) { if (window.location.host.indexOf('fcrmyx.oytour.com') != -1) {
domainUrl = "http://crm.oytour.com" domainUrl = "http://crm.oytour.com"
...@@ -33,75 +35,17 @@ export default { ...@@ -33,75 +35,17 @@ export default {
DownLoadContractUrl: domainPostUrl, DownLoadContractUrl: domainPostUrl,
//阿里服务器地址 //阿里服务器地址
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com", AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com",
//本站文件流下载地址 //CRMApi地址
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
PostUrl: domainUrl, 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", 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', 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", 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; 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) { Vue.prototype.Success = function (msg) {
this.$message({ this.$message({
...@@ -168,18 +112,14 @@ export default { ...@@ -168,18 +112,14 @@ export default {
} }
return path.split('?')[0] + '?width=' + w; return path.split('?')[0] + '?width=' + w;
} }
//打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') {
window.open('http://' + URL, '_blank');
}
}
//旅游ERP接口 //旅游ERP接口
Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost2 = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
var apiurl = this.domainManager().PostUrl2; var apiurl = this.domainManager().ERPApiUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
this.apiurl = apiurl; this.apiurl = apiurl;
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -222,6 +162,8 @@ export default { ...@@ -222,6 +162,8 @@ export default {
} }
}, faildCall) }, faildCall)
} }
//CRM接口
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
...@@ -263,6 +205,8 @@ export default { ...@@ -263,6 +205,8 @@ export default {
} }
}, faildCall) }, faildCall)
}, },
//Java接口
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
...@@ -312,55 +256,6 @@ export default { ...@@ -312,55 +256,6 @@ export default {
successCall(res) successCall(res)
} }
}, faildCall) }, 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