Commit 9d30a91a authored by Mac's avatar Mac

1

parent 250c6f59
......@@ -176,6 +176,36 @@ class customerService {
data
})
}
// 获取客户标签/分组 列表
static async getWeChatLableList(data: any): Promise<HttpResponse> {
return Axios('/QYWeChat/GetWeChatLableList', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async setWeChatLable(data: {
Id:number,
ParentId:number,
Name:string,
Sort:string,
ChildList:Array<{Name:string, Sort:string}>
}): Promise<HttpResponse> {
return Axios('/QYWeChat/SetWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
// 新增修改分组/标签
static async delWeChatLable(data: {LableId:number}): Promise<HttpResponse> {
return Axios('/QYWeChat/DelWeChatLable', {
method: 'post',
responseType: 'json',
data
})
}
}
export default customerService
......@@ -9,7 +9,6 @@
active-color="primary"
indicator-color="primary"
narrow-indicator
@update:model-value='gettabs'
>
<q-tab name="yewumoshi" label="业务模式" />
<q-tab name="field" label="客户字段" />
......@@ -17,13 +16,12 @@
<q-tab name="clue" label="线索分配规则" />
<q-tab name="phase" label="客户阶段" />
</q-tabs>
<div>
<customer-Field v-if="tab == 'field'"></customer-Field>
<clue-rule v-if="tab == 'clue'"></clue-rule>
<customer-phase v-if="tab == 'phase'"></customer-phase>
<customerlabel v-if="tab == 'label'"></customerlabel>
</div>
</q-page>
</div>
</template>
......@@ -49,20 +47,13 @@ export default defineComponent({
customerlabel
},
setup() {
let tab = ref<string>('phase')
let tab = ref<string>('label')
if( router.currentRoute.value.query && router.currentRoute.value.query.type){
tab.value = router.currentRoute.value.query.type as string
}
const gettabs = () => {
// console.log(tab.value)
}
// if(props && props.type){
// }
return {
tab,
gettabs
}
}
......
......@@ -24,15 +24,18 @@
</div>
<div class="content-block">
<div class="bold">阶段适用范围</div>
<!-- <q-input clearable debounce filled maxlength="20" counter v-model="state.addMsg.FlowName" style="width:600px"
placeholder="名称" :rules="[val => !!val || '不能为空']" />-->
<q-btn color="accent" label="选择部门/成员" @click="choicemember" />
</div>
<div class="content-block">
<div class="bold">
选择使用阶段
<span style="font-size: 14px;font-weight: 300;color:rgb(133, 133, 152);">
若没有找到可选项,请前往
<span style="color:#3470ff;cursor: pointer;" @click="stageManagement">"阶段管理"</span>进行
<span
style="color:#3470ff;cursor: pointer;"
@click="stageManagement"
>"阶段管理"</span>进行
</span>
</div>
<div style="display:flex;align-items: center;">
......@@ -55,16 +58,15 @@
<div class="all-stage" :style="{ height: state.getheight + 'px' }">
<p class="select-item-title">已选阶段</p>
<div v-for="(x,y) in state.UseStageName" :key="y">
<div style="height:40px;line-height: 40px;" v-if="x.IsDefault == 0">
<span >{{ x.Name }}</span>
<div style="height:40px;line-height: 40px;" v-if="x.IsDefault == 0">
<span>{{ x.Name }}</span>
</div>
</div>
<div
v-for="(x,y) in state.UseStageName"
:key="y"
>
<span v-if="x.IsDefault == 1" style="color: #ccc;height:40px;line-height: 40px;">{{ x.Name }}</span>
<div v-for="(x,y) in state.UseStageName" :key="y">
<span
v-if="x.IsDefault == 1"
style="color: #ccc;height:40px;line-height: 40px;"
>{{ x.Name }}</span>
</div>
</div>
</div>
......@@ -98,7 +100,7 @@
</span>
</div>
<div style="display:flex;align-items: center;flex-wrap: wrap;">
<div v-if="x.Name =='已输单'">
<div v-if="x.Name == '已输单'">
<q-checkbox
v-model="state.addMsg.LoseCause"
v-for="(item,index) in x.OptionsList"
......@@ -108,7 +110,7 @@
/>
</div>
<div v-if="x.Name =='无效'">
<div v-if="x.Name == '无效'">
<q-checkbox
v-model="state.addMsg.InvalidCause"
v-for="(item,index) in x.OptionsList"
......@@ -122,17 +124,31 @@
</div>
</div>
</div>
<departmentStaff
v-model="state.showDialog"
v-model:defaultArray="state.defaultArray"
nodeKey="newId"
labelKey="DeptName"
childrenKey="ChildList"
strategy="leaf"
:treeData="state.dataTree"
/>
</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, reactive, } from 'vue'
import router from '@/router/index'
import customerService from '@/api/customer'
import departmentStaff from '@/components/common/departmentStaff.vue'
import customerService2 from '@/api/customer2'
import { useQuasar } from 'quasar'
export default defineComponent({
components: {
departmentStaff
},
setup() {
const $q = useQuasar()
const state: any = reactive({
......@@ -149,12 +165,15 @@ export default defineComponent({
getheight: 270,
loading: false,
UseStageName: [],
showDialog: false,
defaultArray: [],
dataTree: [],
})
const jumpBeforePage = () => {
router.push({
path: '/customerSetup',
query: {
type:'phase'
type: 'phase'
}
})
}
......@@ -220,8 +239,34 @@ export default defineComponent({
position: 'top'
})
}
let choicemember = () => {
state.showDialog = true
}
let getEmployeeData = () => {
customerService2.getEmployeeData({}).then(res => {
state.dataTree = res.data.Data
// 重组唯一id
if (state.dataTree.length == 0) return
state.dataTree.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
})
})
}
let getChildList = (ChildList: Array<any>) => {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
getChildList(x.ChildList)
}
})
}
onMounted(() => {
getList()
getEmployeeData()
})
return {
state,
......@@ -230,7 +275,10 @@ export default defineComponent({
getusestageName,
compare,
stageManagement,
savemove
savemove,
choicemember,
getEmployeeData,
getChildList
}
}
......
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