Commit 903727d3 authored by 罗超's avatar 罗超

1

parent 86ede3fc
...@@ -77,7 +77,15 @@ ...@@ -77,7 +77,15 @@
show.value = val show.value = val
} }
) )
let selectList = ref(props.list) let selectList = ref(props.list)
watch(
() => props.list,
val => {
selectList.value = val
getLabelList()
}
)
let LableList = ref([]) let LableList = ref([])
const goclose = () => {//关闭弹窗 const goclose = () => {//关闭弹窗
ctx.emit('update:modelValue',false) ctx.emit('update:modelValue',false)
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
onMounted onMounted
} from 'vue' } from 'vue'
import customerSetService from '@/api/customerSet' import customerSetService from '@/api/customerSet'
import customerService from '@/api/customer'
import labelgroup from './label-group.vue' import labelgroup from './label-group.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { import {
...@@ -317,21 +318,15 @@ ...@@ -317,21 +318,15 @@
} }
case 4: { case 4: {
//多选 //多选
console.log('多选',e)
e.labelType = 4 e.labelType = 4
if (e.Id == '标签') {
e.StartValue = ''
} else {
if (e.StartValue) {
e.StartValue = e.StartValue.split(',').map(e => Number(e))
} else {
e.StartValue = []
}
}
e.directionList = directionList1 e.directionList = directionList1
if (find.OptionsList) { if (find.OptionsList) {
e.OptionsList = find.OptionsList e.OptionsList = find.OptionsList
} }
if(e.Name=='标签'&&e.StartValue){
getLabelByIds(e.StartValue)
}
break break
} }
case 5: { case 5: {
...@@ -600,6 +595,7 @@ ...@@ -600,6 +595,7 @@
} }
return flag return flag
} }
watch( watch(
() => [...addMsg.value], () => [...addMsg.value],
val => { val => {
...@@ -622,6 +618,13 @@ ...@@ -622,6 +618,13 @@
deep: true deep: true
} }
) )
const getLabelByIds = ids => {
customerService.getLabelListByIds(ids).then(res => {
if (res.data && res.data.Data) {
lableList.value = res.data.Data
}
})
}
onMounted(() => { onMounted(() => {
//进入页面就调用 //进入页面就调用
setTimeout(() => { setTimeout(() => {
...@@ -648,7 +651,8 @@ ...@@ -648,7 +651,8 @@
changeDate, changeDate,
changeRange, changeRange,
changeAddCondition, changeAddCondition,
checkRule checkRule,
getLabelByIds,
} }
} }
}) })
......
...@@ -38,10 +38,6 @@ const data = reactive<dataParams>({ ...@@ -38,10 +38,6 @@ const data = reactive<dataParams>({
peopleNum: 0, peopleNum: 0,
selectOptionList:[], selectOptionList:[],
}) })
const whereData = reactive({
list: [],
condition:1,
})
const jumpBeforePage = () => { const jumpBeforePage = () => {
router.push({ router.push({
path: '/customerSetup', path: '/customerSetup',
...@@ -101,7 +97,6 @@ const editRuleModule = () => { ...@@ -101,7 +97,6 @@ const editRuleModule = () => {
return '2-' + e.Id return '2-' + e.Id
}) })
data.defaultArray = [...Dep, ...Emp] data.defaultArray = [...Dep, ...Emp]
console.log(d.ConditionList, 'ConditionList')
}) })
} }
//获取部门数据 //获取部门数据
...@@ -129,15 +124,6 @@ const editRuleModule = () => { ...@@ -129,15 +124,6 @@ const editRuleModule = () => {
} }
// 新增,修改 // 新增,修改
const setCustomerClueRuleInfo = () => { const setCustomerClueRuleInfo = () => {
console.log(data.editMsg.ConditionList)
// const flag = condition.value.checkRule(data.editMsg.ConditionList)
// console.log(94, flag)
// if (!flag) return
// if (data.editMsg.DeptList.length == 0 && data.editMsg.EmpList.length == 0) {
// message.warnMsg('适用部门/成员')
// return
// }
customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => { customerSetService.setCustomerClueRuleInfo(data.editMsg).then(res => {
message.successMsg(res.data.Message) message.successMsg(res.data.Message)
setTimeout(() => { setTimeout(() => {
...@@ -150,25 +136,7 @@ const editRuleModule = () => { ...@@ -150,25 +136,7 @@ const editRuleModule = () => {
}, 2000) }, 2000)
}) })
} }
const getCustomerFiledList = () => {
customerSetService
.getCustomerFiledList({
Enable: 1
})
.then(res => {
data.selectOptionList=[]
res.data.Data.map(e => {
const obj = {
name: e.Name,
value: e.Name,
data: e,
IsCustom: 1
}
data.selectOptionList.push(obj)
})
console.log(160,data.selectOptionList)
})
}
return { return {
msg, msg,
condition, condition,
...@@ -181,8 +149,6 @@ const editRuleModule = () => { ...@@ -181,8 +149,6 @@ const editRuleModule = () => {
getCondition, getCondition,
getdpt, getdpt,
getNum, getNum,
whereData,
getCustomerFiledList
} }
} }
......
...@@ -11,13 +11,12 @@ ...@@ -11,13 +11,12 @@
<div class="content-block"> <div class="content-block">
<div class="fission-title">选择待分配客户</div> <div class="fission-title">选择待分配客户</div>
<div class="fission-subtitle">当待分配客户符合以下条件时</div> <div class="fission-subtitle">当待分配客户符合以下条件时</div>
<!-- <requestGroup <requestGroup
v-model:addCondition="editMsg.RuleSelectType" v-model:addCondition="editMsg.RuleSelectType"
:defaultData="defaultConditionList" :defaultData="defaultConditionList"
ref="condition" ref="condition"
@change="getCondition" @change="getCondition"
/> --> />
<where :data="whereData" :columns="selectOptionList"/>
</div> </div>
<div class="content-block mt20"> <div class="content-block mt20">
<div class="fission-title">分配给以下部门/成员</div> <div class="fission-title">分配给以下部门/成员</div>
...@@ -79,15 +78,15 @@ import { ...@@ -79,15 +78,15 @@ import {
toRefs, toRefs,
onMounted onMounted
} from 'vue' } from 'vue'
// import requestGroup from '@/components/customer/request-group.vue' import requestGroup from '@/components/customer/request-group.vue'
import departmentStaff from '@/components/common/departmentStaff.vue' import departmentStaff from '@/components/common/departmentStaff.vue'
import editRuleModule from '@/module/editor/editRuleModule' import editRuleModule from '@/module/editor/editRuleModule'
import where from '@/components/common/customWhere/where.vue' // import where from '@/components/common/customWhere/where.vue'
export default defineComponent({ export default defineComponent({
components: { components: {
// requestGroup, requestGroup,
departmentStaff, departmentStaff,
where // where
}, },
setup() { setup() {
let { let {
...@@ -102,8 +101,6 @@ export default defineComponent({ ...@@ -102,8 +101,6 @@ export default defineComponent({
getCondition, getCondition,
getdpt, getdpt,
getNum, getNum,
whereData,
getCustomerFiledList,
} = editRuleModule(); } = editRuleModule();
onMounted(() => { onMounted(() => {
if (msg().RuleId > 0) { if (msg().RuleId > 0) {
...@@ -118,7 +115,6 @@ export default defineComponent({ ...@@ -118,7 +115,6 @@ export default defineComponent({
data.defaultArray = [] data.defaultArray = []
} }
getEmployeeData() getEmployeeData()
getCustomerFiledList()
}) })
return { return {
jumpBeforePage, jumpBeforePage,
...@@ -129,7 +125,6 @@ export default defineComponent({ ...@@ -129,7 +125,6 @@ export default defineComponent({
getCondition, getCondition,
getdpt, getdpt,
getNum, getNum,
whereData
} }
} }
......
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