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

1

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