Commit eefe4c5e authored by 罗超's avatar 罗超

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

# Conflicts:
#	src/components/guestManagement/guestManagement.vue
parents 780fc879 1c5cdff8
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
</div> </div>
</div> </div>
</div> </div>
<el-select size="mini" popper-class="select-no" slot="reference" v-model="msg.ID" <el-select size="mini" popper-class="select-no" slot="reference" v-model="msg.ID"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in SceneEmployeeList" :key="item.ID" :label="item.SceneName" <el-option v-for="item in SceneEmployeeList" :key="item.ID" :label="item.SceneName"
...@@ -197,12 +198,12 @@ ...@@ -197,12 +198,12 @@
<el-drawer :with-header="false" size='70%' :visible.sync="isShowCustomerInfo" direction="rtl" <el-drawer :with-header="false" size='70%' :visible.sync="isShowCustomerInfo" direction="rtl"
:before-close="handleClose"> :before-close="handleClose">
<customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters" <customerInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters"
@editCustS="editCust" @getList="getList" /> @editCustS="editCust" @getList="getList" />
</el-drawer> </el-drawer>
<el-drawer :with-header="false" size='70%' :visible.sync="isShowGuestInfo" direction="rtl" <el-drawer :with-header="false" size='70%' :visible.sync="isShowGuestInfo" direction="rtl"
:before-close="handleClose"> :before-close="handleClose">
<guestInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters" <guestInfoBox :CustomerId="CustomerId" @transferS="transfer" @deleteClue="deleteClue" @watersS="waters"
@editCustS="editCust" @getList="getList" /> @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" />
...@@ -360,25 +361,9 @@ ...@@ -360,25 +361,9 @@
WhereType: -1, WhereType: -1,
OrderBy: '', OrderBy: '',
CustomerType: 1, CustomerType: 1,
ID: 29, ID: 33,
}, },
total: 0, total: 0,
WhereTypeList: [{
id: -1,
name: '全部'
}, {
id: 1,
name: '我负责的'
}, {
id: 2,
name: '下属的'
}, {
id: 3,
name: '我参与的'
}, {
id: 4,
name: '我关注的'
}, ],
selectionList: [{ selectionList: [{
name: '转移', name: '转移',
class: 'iconfont iconplus-transfer', class: 'iconfont iconplus-transfer',
...@@ -394,7 +379,7 @@ ...@@ -394,7 +379,7 @@
}], }],
sceneList: [], sceneList: [],
SceneEmployeeList: [], SceneEmployeeList: [],
sceneID: 29, sceneID: 33,
visible: false, visible: false,
isShowImport: false, //是否显示导入弹窗 isShowImport: false, //是否显示导入弹窗
importType: 1, //导入文件类型(1-客户导入,2-直客导入) importType: 1, //导入文件类型(1-客户导入,2-直客导入)
......
<style> <style>
.sceneBox .el-form{ .sceneBox .el-form {
padding: 20px; padding: 20px;
padding-top: 0; padding-top: 0;
} }
.sceneBox .el-form--label-top .el-form-item__label{
padding: 0; .sceneBox .el-form--label-top .el-form-item__label {
} padding: 0;
.sceneBox .el-form-item{ }
margin: 0;
} .sceneBox .el-form-item {
.sceneBox .delete-btn{ margin: 0;
margin-left: 15px; }
}
.add-tj{ .sceneBox .delete-btn {
padding: 0 20px 20px; margin-left: 15px;
} }
.sceneBox .dialog-footer{
text-align: center; .add-tj {
} padding: 0 20px 20px;
}
.sceneBox .dialog-footer {
text-align: center;
}
</style> </style>
<template> <template>
<div class="sceneBox"> <div class="sceneBox">
...@@ -28,8 +33,10 @@ ...@@ -28,8 +33,10 @@
<el-form-item label="筛选条件"> <el-form-item label="筛选条件">
<el-row v-for="(item, index) in dataList" :key="index" style="margin-bottom: 15px;"> <el-row v-for="(item, index) in dataList" :key="index" style="margin-bottom: 15px;">
<el-col :span="8"> <el-col :span="8">
<el-select v-model="item.SceneIndex" placeholder="请选择要筛选的字段名" style="width: 100%;" @change="changeScene(item, index)"> <el-select v-model="item.SceneIndex" placeholder="请选择要筛选的字段名" style="width: 100%;"
<el-option v-for="(scene, sIndex) in item.sceneList" :label="scene.Name" :value="sIndex" :key="sIndex"></el-option> @change="changeScene(item, index)">
<el-option v-for="(scene, sIndex) in item.sceneList" :label="scene.Name" :value="sIndex"
:key="sIndex"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
...@@ -39,37 +46,34 @@ ...@@ -39,37 +46,34 @@
<template v-if="item.regionS && item.regionS.length"> <template v-if="item.regionS && item.regionS.length">
<el-col :span="5"> <el-col :span="5">
<el-select v-model="item.region" placeholder="请选择" @change="changeRegion(item, index)"> <el-select v-model="item.region" placeholder="请选择" @change="changeRegion(item, index)">
<el-option v-for="(r, rx) in item.regionS" :key="rx" :label="r.c" :value="r.n"></el-option> <el-option v-for="(r, rx) in item.regionS" :key="rx" :label="r.c" :value="r.n">
</el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="1"> <el-col :span="1">
&nbsp; &nbsp;
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-input v-if="!item.Setting.length && item.nameStr !== '负责人' && item.nameStr !== '创建人'" v-model="item.SceneName" placeholder="请输入筛选条件"></el-input> <el-input v-if="!item.Setting.length && item.nameStr !== '负责人' && item.nameStr !== '创建人'"
<el-select v-else-if="item.nameStr === '负责人' || item.nameStr === '创建人'" v-model="item.id" filterable @change="changeFC(index)" placeholder="请选择" style="width: 100%;" > v-model="item.SceneName" placeholder="请输入筛选条件"></el-input>
<el-option
filterable <el-select v-else-if="item.nameStr === '负责人' || item.nameStr === '创建人'" v-model="item.id"
v-for="item in EmployeeList" filterable @change="changeFC(index)" placeholder="请选择" style="width: 100%;">
:label='item.EmName' <el-option filterable v-for="item in EmployeeList" :label='item.EmName'
:value='item.EmployeeId' :value='item.EmployeeId' :key='item.EmployeeId'>
:key='item.EmployeeId'>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-else v-model="item.SceneName" filterable placeholder="请选择" style="width: 100%;" > <el-select v-else v-model="item.SceneName" filterable placeholder="请选择"
<el-option v-for="(select, sIndex) in item.Setting" :label="select" :value="select" :key="sIndex"></el-option> style="width: 100%;">
<el-option v-for="(select, sIndex) in item.Setting" :label="select" :value="select"
:key="sIndex"></el-option>
</el-select> </el-select>
</el-col> </el-col>
</template> </template>
<template v-else> <template v-else>
<el-col :span="14"> <el-col :span="14">
<el-date-picker <el-date-picker style="width: 100%;" v-model="item.time" value-format="yyyy-MM-dd hh:mm:ss"
style="width: 100%;" type="datetimerange" range-separator="至" start-placeholder="开始日期"
v-model="item.time"
value-format="yyyy-MM-dd hh:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-col> </el-col>
...@@ -81,7 +85,8 @@ ...@@ -81,7 +85,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="add-tj"> <div class="add-tj">
<p> <span class="font-color-link cp" @click="addRow"><i class="el-icon-circle-plus-outline"></i> 添加筛选条件</span></p> <p> <span class="font-color-link cp" @click="addRow"><i class="el-icon-circle-plus-outline"></i>
添加筛选条件</span></p>
</div> </div>
<div class="add-tj"> <div class="add-tj">
<el-checkbox v-model="checked" v-if="sceneType!==1 && LableType!==6">保存为场景</el-checkbox> <el-checkbox v-model="checked" v-if="sceneType!==1 && LableType!==6">保存为场景</el-checkbox>
...@@ -96,92 +101,91 @@ ...@@ -96,92 +101,91 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: ['LableType', 'sceneType', 'sceneDataList'], props: ['LableType', 'sceneType', 'sceneDataList'],
data(){ data() {
return{ return {
checked: false, checked: false,
sceneMsg: { sceneMsg: {
SceneName: '', SceneName: '',
IsDefault: 0, IsDefault: 0,
},
WhereDataStr: {
NextContactTime: {
start: '',
end: '',
formType: '',
name: ''
},
CustomerName: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactPhone: {
condition: '',
value: '',
formType: '',
name: '',
},
Remark: {
condition: '',
value: '',
formType: '',
name: '',
},
PersonChargeId: {
condition: '',
value: '',
formType: '',
name: '',
},
CreateBy: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactName: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactDuty: {
condition: '',
value: '',
formType: '',
name: '',
},
IsMain: {
condition: '',
value: '',
formType: '',
name: '',
},
Sex: {
condition: '',
value: '',
formType: '',
name: '',
},
CreateTime: {
start: '',
end: '',
formType: '',
name: '',
}, },
UpdateTime: { WhereDataStr: {
start: '', NextContactTime: {
end: '', start: '',
formType: '', end: '',
name: '', formType: '',
name: ''
},
CustomerName: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactPhone: {
condition: '',
value: '',
formType: '',
name: '',
},
Remark: {
condition: '',
value: '',
formType: '',
name: '',
},
PersonChargeId: {
condition: '',
value: '',
formType: '',
name: '',
},
CreateBy: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactName: {
condition: '',
value: '',
formType: '',
name: '',
},
ContactDuty: {
condition: '',
value: '',
formType: '',
name: '',
},
IsMain: {
condition: '',
value: '',
formType: '',
name: '',
},
Sex: {
condition: '',
value: '',
formType: '',
name: '',
},
CreateTime: {
start: '',
end: '',
formType: '',
name: '',
},
UpdateTime: {
start: '',
end: '',
formType: '',
name: '',
},
LableType: 1
}, },
LableType: 1 dataList: [{
},
dataList: [
{
SceneName: '', SceneName: '',
IsDefault: '', IsDefault: '',
region: '', region: '',
...@@ -192,81 +196,78 @@ export default { ...@@ -192,81 +196,78 @@ export default {
time: [], time: [],
WhereDataStr: {}, WhereDataStr: {},
formType: '' formType: ''
} }],
], region: [],
region: [], optionsNames: [{
optionsNames: [ c: "等于",
{ n: 'is',
c: "等于", t: "t",
n: 'is', },
t: "t", {
}, c: "不等于",
{ n: 'isnot',
c: "不等于", t: "t",
n: 'isnot', },
t: "t", {
}, c: "包含",
{ n: "contains"
c: "包含", },
n: "contains" {
}, c: "不包含",
{ n: "not_contain"
c: "不包含", },
n: "not_contain" {
}, c: '开始于',
{ n: 'start_with'
c: '开始于', },
n: 'start_with' {
}, c: '结束于',
{ n: 'end_with'
c: '结束于', },
n: 'end_with' {
}, c: '为空',
{ n: 'is_empty'
c: '为空', },
n: 'is_empty' {
}, c: '不为空',
{ n: 'is_not_empty'
c: '不为空', },
n: 'is_not_empty' {
}, c: '等于',
{ n: 'eq'
c: '等于', },
n: 'eq' {
}, c: '不等于',
{ n: 'neq'
c: '不等于', },
n: 'neq' {
}, c: '大于',
{ n: 'gt'
c: '大于', },
n: 'gt' {
}, c: '大于等于',
{ n: 'egt'
c: '大于等于', },
n: 'egt' {
}, c: '小于',
{ n: 'lt'
c: '小于', },
n: 'lt'
},
{
c: '小于等于',
n: 'elt'
},
],
sceneList: [],
regionShow: true,
userInfo: {},
EmployeeList: [],
}
},
watch: {
LableType:{
handler(val, oldVal){
this.GetSceneList()
this.dataList = [
{ {
c: '小于等于',
n: 'elt'
},
],
sceneList: [],
regionShow: true,
userInfo: {},
EmployeeList: [],
}
},
watch: {
LableType: {
handler(val, oldVal) {
this.GetSceneList()
this.dataList = [{
SceneName: '', SceneName: '',
IsDefault: '', IsDefault: '',
region: '', region: '',
...@@ -277,16 +278,14 @@ export default { ...@@ -277,16 +278,14 @@ export default {
time: [], time: [],
WhereDataStr: {}, WhereDataStr: {},
formType: '' formType: ''
} }]
] },
deep: true
}, },
deep:true sceneDataList: {
}, handler(val, oldVal) {
sceneDataList: { this.GetSceneList()
handler(val, oldVal){ this.dataList = [{
this.GetSceneList()
this.dataList = [
{
SceneName: '', SceneName: '',
IsDefault: '', IsDefault: '',
region: '', region: '',
...@@ -297,127 +296,127 @@ export default { ...@@ -297,127 +296,127 @@ export default {
time: [], time: [],
WhereDataStr: {}, WhereDataStr: {},
formType: '' formType: ''
}]
this.sceneMsg = {
SceneName: '',
IsDefault: 0,
} }
] },
this.sceneMsg = { deep: true
SceneName: '',
IsDefault: 0,
}
},
deep:true
}
},
mounted(){
this.userInfo = this.getLocalStorage();
this.GetSceneList()
this.Employee()
},
methods:{
// 修改组装数据
sceneInitDataList(){
this.dataList = []
let item = JSON.parse(this.sceneDataList.WhereData)
let i = 0
var arr = []
for (let i in item) {
arr.push(item[i])
} }
arr.map((x, index)=>{
this.sceneList.map((s, sIndex)=>{
if(x.name === s.FieldName) {
let msg = {
SceneName: x.value,
IsDefault: '',
region: x.condition,
regionS: [],
sceneList: this.sceneList,
SceneIndex: sIndex,
Setting: s.Setting,
time: [x.start, x.end],
WhereDataStr: {},
formType: s.FormType
}
this.dataList.push(msg)
this.changeScene(this.dataList[index], index, 2)
}
})
})
}, },
changeFC(index){ mounted() {
for(let i = 0; i < this.EmployeeList.length; i++){ this.userInfo = this.getLocalStorage();
if (this.EmployeeList[i].EmployeeId === this.dataList[index].id){ this.GetSceneList()
this.dataList[index].SceneName = this.EmployeeList[i].EmployeeId this.Employee()
this.dataList[index].nameFC = this.EmployeeList[i].EmName
break;
}
}
}, },
sceneAdd(){ methods: {
let msg = {}, list = [], ok = true; // 修改组装数据
this.dataList.forEach( item =>{ sceneInitDataList() {
if(item.formType === 'datetime') { this.dataList = []
if(!item.time.length){ let item = JSON.parse(this.sceneDataList.WhereData)
ok = false let i = 0
this.$message.error('筛选内容不能为空!') var arr = []
return for (let i in item) {
arr.push(item[i])
}
arr.map((x, index) => {
this.sceneList.map((s, sIndex) => {
if (x.name === s.FieldName) {
let msg = {
SceneName: x.value,
IsDefault: '',
region: x.condition,
regionS: [],
sceneList: this.sceneList,
SceneIndex: sIndex,
Setting: s.Setting,
time: [x.start, x.end],
WhereDataStr: {},
formType: s.FormType
}
this.dataList.push(msg)
this.changeScene(this.dataList[index], index, 2)
}
})
})
},
changeFC(index) {
for (let i = 0; i < this.EmployeeList.length; i++) {
if (this.EmployeeList[i].EmployeeId === this.dataList[index].id) {
this.dataList[index].SceneName = this.EmployeeList[i].EmployeeId
this.dataList[index].nameFC = this.EmployeeList[i].EmName
break;
} }
msg[item.FieldName] = { }
start: item.time[0], },
end: item.time[1], sceneAdd() {
formType: item.formType, let msg = {},
name: item.FieldName, list = [],
str: item.nameStr, ok = true;
regionStr: item.regionStr this.dataList.forEach(item => {
if (item.formType === 'datetime') {
if (!item.time.length) {
ok = false
this.$message.error('筛选内容不能为空!')
return
}
msg[item.FieldName] = {
start: item.time[0],
end: item.time[1],
formType: item.formType,
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr
}
list.push({
start: item.time[0],
end: item.time[1],
formType: item.formType,
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr,
nameFC: item.nameFC
})
} else {
if (!item.SceneName) {
ok = false
this.$message.error('筛选内容不能为空!')
return
}
msg[item.FieldName] = {
condition: item.region,
value: item.SceneName,
formType: item.formType,
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr
}
list.push({
condition: item.region,
value: item.SceneName,
formType: item.formType,
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr,
nameFC: item.nameFC
})
} }
list.push({ })
start: item.time[0], if (ok && (this.checked || this.sceneType === 1)) {
end: item.time[1], if (this.sceneMsg.SceneName === '') {
formType: item.formType, return this.$message.error('场景名称不能为空!')
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr,
nameFC: item.nameFC
})
} else {
if(!item.SceneName){
ok = false
this.$message.error('筛选内容不能为空!')
return
} }
msg[item.FieldName] = { this.sceneMsg.WhereDataStr = msg
condition: item.region, this.sceneMsg.LableType = this.LableType
value: item.SceneName, if (this.sceneDataList) {
formType: item.formType, this.sceneMsg.ID = this.sceneDataList.ID
name: item.FieldName,
str: item.nameStr,
regionStr: item.regionStr
} }
list.push({ this.apipost('/api/Scene/AddSceneEmployee', this.sceneMsg, res => {
condition: item.region, if (res.data.resultCode == 1) {
value: item.SceneName, this.$message.success('操作成功')
formType: item.formType, this.MsgBus.$emit('editScene')
name: item.FieldName, this.dataList = [{
str: item.nameStr,
regionStr: item.regionStr,
nameFC: item.nameFC
})
}
})
if(ok && (this.checked || this.sceneType === 1)) {
if(this.sceneMsg.SceneName === '') {
return this.$message.error('场景名称不能为空!')
}
this.sceneMsg.WhereDataStr = msg
this.sceneMsg.LableType = this.LableType
if(this.sceneDataList) {
this.sceneMsg.ID = this.sceneDataList.ID
}
this.apipost('/api/Scene/AddSceneEmployee', this.sceneMsg, res=>{
if (res.data.resultCode == 1) {
this.$message.success('操作成功')
this.MsgBus.$emit('editScene')
this.dataList = [
{
SceneName: '', SceneName: '',
IsDefault: '', IsDefault: '',
region: '', region: '',
...@@ -428,103 +427,110 @@ export default { ...@@ -428,103 +427,110 @@ export default {
time: [], time: [],
WhereDataStr: {}, WhereDataStr: {},
formType: '' formType: ''
} }]
] this.checked = false
this.checked = false }
})
}
if (this.sceneDataList && ok) {
this.MsgBus.$emit('sceneBoxClose')
} else if (ok) {
setTimeout(() => {
this.MsgBus.$emit('sceneBoxClose')
this.MsgBus.$emit('sceneSave', list)
}, 500)
}
},
changeRegion(i, index) {
this.optionsNames.map(x => {
if (x.n === i.region) {
this.dataList[index].regionStr = x.c
} }
}) })
} },
if(this.sceneDataList && ok) { changeScene(item, pIndex, type) {
this.MsgBus.$emit('sceneBoxClose') this.dataList[pIndex].regionS = this.dataList[pIndex].sceneList[item.SceneIndex].region
} else if (ok){ this.dataList[pIndex].nameStr = this.dataList[pIndex].sceneList[item.SceneIndex].Name
setTimeout(()=>{ this.dataList[pIndex].formType = this.dataList[pIndex].sceneList[item.SceneIndex].FormType
this.MsgBus.$emit('sceneBoxClose') this.dataList[pIndex].region = type ? this.dataList[pIndex].region : ''
this.MsgBus.$emit('sceneSave', list) this.dataList[pIndex].FieldName = this.dataList[pIndex].sceneList[item.SceneIndex].FieldName
}, 500) this.dataList[pIndex].SceneName = type ? this.dataList[pIndex].SceneName : ''
} this.dataList[pIndex].time = type && this.dataList[pIndex].formType === 'datetime' ? this.dataList[
pIndex].time : []
}, this.region = this.sceneList[item.SceneIndex].region
changeRegion(i, index){ if (this.dataList[pIndex].nameStr && type) {
this.optionsNames.map(x=>{ this.dataList[pIndex].id = this.dataList[pIndex].SceneName
if(x.n === i.region) {
this.dataList[index].regionStr = x.c
} }
}) if (this.dataList[pIndex].sceneList[item.SceneIndex].FormType === 'select') {
this.dataList[pIndex].Setting = this.dataList[pIndex].sceneList[item.SceneIndex].Setting
}, } else {
changeScene(item, pIndex, type){ this.dataList[pIndex].Setting = []
this.dataList[pIndex].regionS = this.dataList[pIndex].sceneList[item.SceneIndex].region }
this.dataList[pIndex].nameStr = this.dataList[pIndex].sceneList[item.SceneIndex].Name this.$forceUpdate()
this.dataList[pIndex].formType = this.dataList[pIndex].sceneList[item.SceneIndex].FormType },
this.dataList[pIndex].region = type ? this.dataList[pIndex].region : '' GetSceneList() {
this.dataList[pIndex].FieldName = this.dataList[pIndex].sceneList[item.SceneIndex].FieldName this.apipost('/api/Scene/GetSceneList', {
this.dataList[pIndex].SceneName = type ? this.dataList[pIndex].SceneName : '' LableType: this.LableType
this.dataList[pIndex].time = type && this.dataList[pIndex].formType === 'datetime' ? this.dataList[pIndex].time : [] }, res => {
this.region = this.sceneList[item.SceneIndex].region if (res.data.resultCode == 1) {
if(this.dataList[pIndex].nameStr && type) { let arr = res.data.data;
this.dataList[pIndex].id = this.dataList[pIndex].SceneName arr.map(x => {
} if (x.Name === '客户名称' || x.Name === '备注' || x.Name === '商机名称' || x.Name ===
if(this.dataList[pIndex].sceneList[item.SceneIndex].FormType === 'select') { '详细地址' || x.Name === '姓名' || x.Name === '地址' || x.Name === '线索名称') {
this.dataList[pIndex].Setting = this.dataList[pIndex].sceneList[item.SceneIndex].Setting x.region = [{
} else { c: "等于",
this.dataList[pIndex].Setting = [] n: 'is',
} t: 't'
this.$forceUpdate() },
}, {
GetSceneList(){ c: "不等于",
this.apipost('/api/Scene/GetSceneList', {LableType: this.LableType}, res=>{ n: 'isnot',
if (res.data.resultCode == 1) { t: 't'
let arr = res.data.data },
arr.map(x=>{ {
if (x.Name === '客户名称' || x.Name === '备注' || x.Name === '商机名称' || x.Name === '详细地址' || x.Name === '姓名' || x.Name === '地址' || x.Name === '线索名称') { c: "包含",
x.region = [ n: "contains"
{ },
c: "等于", {
n: 'is', c: "不包含",
t: 't' n: "not_contain"
}, },
{ ]
c: "不等于", } else if (x.Name === '手机' || x.Name === '详细地址') {
n: 'isnot', x.region = this.optionsNames.filter(item => {
t: 't' return !item.t
}, })
{ } else if (x.Name === '负责人' || x.Name === '客户类别' || x.Name === '创建人' ||
c: "包含", x.Name === '线索来源' || x.Name === '客户来源' || x.Name === '客人级别' ||
n: "contains" x.Name === '经营场所' || x.Name === '性别' || x.Name === '是否关键决策人' ||
}, x.Name === '职务' || x.Name === '商机状态组' || x.Name === '交客数' ||
{ x.Name === '优惠券数' || x.Name === '交易金额' || x.Name === '幸福存折' ||
c: "不包含", x.Name === '线索状态'
n: "not_contain" ) {
}, x.region = this.optionsNames.filter(item => {
] return (item.c === '等于' || item.c === '不等于') && item.t
} else if (x.Name === '手机' || x.Name === '详细地址') { })
x.region = this.optionsNames.filter(item=>{ } else if (x.Name === '商机金额' || x.Name === '累计订单数') {
return !item.t x.region = this.optionsNames.filter(item => {
}) return !item.t || item.c !== '开始于' || item.c !== '结束于'
} else if (x.Name === '负责人' || x.Name === '客户类别' || x.Name === '创建人' || x.Name === '线索来源' || x.Name === '客户来源' || x.Name === '客人级别' || x.Name === '经营场所' || x.Name === '性别' || x.Name === '是否关键决策人' || x.Name === '职务' || x.Name === '商机状态组' || x.Name === '交客数' || x.Name === '优惠券数' || x.Name === '交易金额' || x.Name === '幸福存折') { })
x.region = this.optionsNames.filter(item=>{ }
return (item.c === '等于' || item.c === '不等于') && item.t
}) })
} else if ( x.Name === '商机金额' || x.Name === '累计订单数') { this.sceneList = arr
x.region = this.optionsNames.filter(item=>{ if (this.sceneDataList) {
return !item.t || item.c !== '开始于' || item.c !== '结束于' this.sceneInitDataList()
}) this.sceneMsg.SceneName = this.sceneDataList.SceneName
this.sceneMsg.IsDefault = this.sceneDataList.IsDefault
} else {
this.dataList[0].sceneList = arr
} }
})
this.sceneList = arr
if (this.sceneDataList){
this.sceneInitDataList()
this.sceneMsg.SceneName = this.sceneDataList.SceneName
this.sceneMsg.IsDefault = this.sceneDataList.IsDefault
} else {
this.dataList[0].sceneList = arr
} }
} })
}) },
}, addRow() {
addRow(){ this.dataList.push({
this.dataList.push(
{
SceneName: '', SceneName: '',
IsDefault: '', IsDefault: '',
region: '', region: '',
...@@ -535,47 +541,45 @@ export default { ...@@ -535,47 +541,45 @@ export default {
time: [], time: [],
WhereDataStr: {}, WhereDataStr: {},
formType: '' formType: ''
} })
) },
}, deleteRow(index) {
deleteRow(index){ this.$confirm('您确定要删除这一条数据吗?', '提示', {
this.$confirm('您确定要删除这一条数据吗?', '提示', { confirmButtonText: '确定',
confirmButtonText: '确定', cancelButtonText: '取消',
cancelButtonText: '取消', type: 'warning'
type: 'warning' }).then(() => {
}).then(() => { this.dataList.splice(index, 1)
this.dataList.splice(index, 1) this.$message({
this.$message({ type: 'success',
type: 'success', message: '删除成功!'
message: '删除成功!' });
}); }).catch(() => {
}).catch(() => { this.$message({
this.$message({ type: 'info',
type: 'info', message: '已取消删除'
message: '已取消删除' });
}); });
}); },
}, Employee() {
Employee(){ let msg = {
let msg = { RB_Group_id: this.userInfo.RB_Group_id,
RB_Group_id: this.userInfo.RB_Group_id, BranchId: -1,
BranchId:-1, DepartmentId: 0,
DepartmentId:0, PostId: 0,
PostId:0, IsLeave: 0,
IsLeave:0,
}
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {
} }
this.apipost2(
"admin_get_EmployeeGetList",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
} else {}
},
err => {}
);
}, },
err => {} }
);
},
} }
}
</script> </script>
\ No newline at end of file
...@@ -517,7 +517,6 @@ export default { ...@@ -517,7 +517,6 @@ export default {
}, },
openDetails(scope) { openDetails(scope) {
console.log(scope.row.ID);
this.MsgBus.$emit("busnessDrawerShow", scope.row.ID, 1); this.MsgBus.$emit("busnessDrawerShow", scope.row.ID, 1);
}, },
// 获取出票状态枚举 // 获取出票状态枚举
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
<div style="display: flex;flex-direction: row;align-items: center;"> <div style="display: flex;flex-direction: row;align-items: center;">
<span class="font-size-12" style="padding-right: 10px;flex-shrink: 0;">状态:</span> <span class="font-size-12" style="padding-right: 10px;flex-shrink: 0;">状态:</span>
<el-select size="mini" width="100" v-model="msg.Q_TOrderState" @change="getList"> <el-select size="mini" width="100" v-model="msg.Q_TOrderState" @change="getList">
<el-option v-for="(item,index) in transactionStatusList" :key="index" :label="item.Name" :value="item.Id"> </el-option> <el-option v-for="(item,index) in transactionStatusList" :key="index" :label="item.Name"
:value="item.Id"> </el-option>
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
...@@ -125,7 +126,8 @@ ...@@ -125,7 +126,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="TOrderNum" label="机票数" sortable v-if="queryType[34].show" show-overflow-tooltip> <el-table-column prop="TOrderNum" label="机票数" sortable v-if="queryType[34].show" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="TOrderMoney" label="机票金额" sortable v-if="queryType[35].show" show-overflow-tooltip> <el-table-column prop="TOrderMoney" label="机票金额" sortable v-if="queryType[35].show"
show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="OrderCount" label="订单交易数" sortable v-if="queryType[24].show" <el-table-column prop="OrderCount" label="订单交易数" sortable v-if="queryType[24].show"
show-overflow-tooltip> show-overflow-tooltip>
...@@ -284,11 +286,22 @@ ...@@ -284,11 +286,22 @@
}, },
data() { data() {
return { return {
transactionStatusList:[ transactionStatusList: [{
{Name:"全部",Id:"0"}, Name: "全部",
{Name:"未成交",Id:"1"}, Id: "0"
{Name:"成交",Id:"2"}, },
{Name:"多次成交",Id:"3"}, {
Name: "未成交",
Id: "1"
},
{
Name: "成交",
Id: "2"
},
{
Name: "多次成交",
Id: "3"
},
], ],
ruleList: [], ruleList: [],
queryType2: [{ queryType2: [{
...@@ -496,7 +509,7 @@ ...@@ -496,7 +509,7 @@
}, { }, {
label: "状态", label: "状态",
show: true, show: true,
},], }, ],
CustomerId: 0, CustomerId: 0,
CustomerIdStr: "", CustomerIdStr: "",
transferVisible: false, transferVisible: false,
...@@ -553,15 +566,19 @@ ...@@ -553,15 +566,19 @@
visible: false, visible: false,
}; };
}, },
created() {
this.GetSceneEmployeeList();
this.Employee();
},
mounted() { mounted() {
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
this.getList(); this.getList();
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.GetSceneEmployeeList();
//保存场景 //保存场景
this.MsgBus.$on("sceneSave", function (msg) { this.MsgBus.$on("sceneSave", function (msg) {
$this.sceneList = [...msg]; $this.sceneList = [...msg];
......
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