Commit 9d30a91a authored by Mac's avatar Mac

1

parent 250c6f59
...@@ -176,6 +176,36 @@ class customerService { ...@@ -176,6 +176,36 @@ class customerService {
data 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 export default customerService
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
active-color="primary" active-color="primary"
indicator-color="primary" indicator-color="primary"
narrow-indicator narrow-indicator
@update:model-value='gettabs'
> >
<q-tab name="yewumoshi" label="业务模式" /> <q-tab name="yewumoshi" label="业务模式" />
<q-tab name="field" label="客户字段" /> <q-tab name="field" label="客户字段" />
...@@ -17,13 +16,12 @@ ...@@ -17,13 +16,12 @@
<q-tab name="clue" label="线索分配规则" /> <q-tab name="clue" label="线索分配规则" />
<q-tab name="phase" label="客户阶段" /> <q-tab name="phase" label="客户阶段" />
</q-tabs> </q-tabs>
<div>
<customer-Field v-if="tab == 'field'"></customer-Field> <customer-Field v-if="tab == 'field'"></customer-Field>
<clue-rule v-if="tab == 'clue'"></clue-rule> <clue-rule v-if="tab == 'clue'"></clue-rule>
<customer-phase v-if="tab == 'phase'"></customer-phase> <customer-phase v-if="tab == 'phase'"></customer-phase>
<customerlabel v-if="tab == 'label'"></customerlabel> <customerlabel v-if="tab == 'label'"></customerlabel>
</div>
</q-page> </q-page>
</div> </div>
</template> </template>
...@@ -49,20 +47,13 @@ export default defineComponent({ ...@@ -49,20 +47,13 @@ export default defineComponent({
customerlabel customerlabel
}, },
setup() { setup() {
let tab = ref<string>('phase') let tab = ref<string>('label')
if( router.currentRoute.value.query && router.currentRoute.value.query.type){ if( router.currentRoute.value.query && router.currentRoute.value.query.type){
tab.value = router.currentRoute.value.query.type as string tab.value = router.currentRoute.value.query.type as string
} }
const gettabs = () => {
// console.log(tab.value)
}
// if(props && props.type){
// }
return { return {
tab, tab,
gettabs
} }
} }
......
...@@ -24,15 +24,18 @@ ...@@ -24,15 +24,18 @@
</div> </div>
<div class="content-block"> <div class="content-block">
<div class="bold">阶段适用范围</div> <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>
<div class="content-block"> <div class="content-block">
<div class="bold"> <div class="bold">
选择使用阶段 选择使用阶段
<span style="font-size: 14px;font-weight: 300;color:rgb(133, 133, 152);"> <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> </span>
</div> </div>
<div style="display:flex;align-items: center;"> <div style="display:flex;align-items: center;">
...@@ -55,16 +58,15 @@ ...@@ -55,16 +58,15 @@
<div class="all-stage" :style="{ height: state.getheight + 'px' }"> <div class="all-stage" :style="{ height: state.getheight + 'px' }">
<p class="select-item-title">已选阶段</p> <p class="select-item-title">已选阶段</p>
<div v-for="(x,y) in state.UseStageName" :key="y"> <div v-for="(x,y) in state.UseStageName" :key="y">
<div style="height:40px;line-height: 40px;" v-if="x.IsDefault == 0"> <div style="height:40px;line-height: 40px;" v-if="x.IsDefault == 0">
<span >{{ x.Name }}</span> <span>{{ x.Name }}</span>
</div> </div>
</div> </div>
<div <div v-for="(x,y) in state.UseStageName" :key="y">
<span
v-for="(x,y) in state.UseStageName" v-if="x.IsDefault == 1"
:key="y" style="color: #ccc;height:40px;line-height: 40px;"
> >{{ x.Name }}</span>
<span v-if="x.IsDefault == 1" style="color: #ccc;height:40px;line-height: 40px;">{{ x.Name }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -98,7 +100,7 @@ ...@@ -98,7 +100,7 @@
</span> </span>
</div> </div>
<div style="display:flex;align-items: center;flex-wrap: wrap;"> <div style="display:flex;align-items: center;flex-wrap: wrap;">
<div v-if="x.Name =='已输单'"> <div v-if="x.Name == '已输单'">
<q-checkbox <q-checkbox
v-model="state.addMsg.LoseCause" v-model="state.addMsg.LoseCause"
v-for="(item,index) in x.OptionsList" v-for="(item,index) in x.OptionsList"
...@@ -108,7 +110,7 @@ ...@@ -108,7 +110,7 @@
/> />
</div> </div>
<div v-if="x.Name =='无效'"> <div v-if="x.Name == '无效'">
<q-checkbox <q-checkbox
v-model="state.addMsg.InvalidCause" v-model="state.addMsg.InvalidCause"
v-for="(item,index) in x.OptionsList" v-for="(item,index) in x.OptionsList"
...@@ -122,17 +124,31 @@ ...@@ -122,17 +124,31 @@
</div> </div>
</div> </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> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, reactive, } from 'vue' import { defineComponent, onMounted, reactive, } from 'vue'
import router from '@/router/index' import router from '@/router/index'
import customerService from '@/api/customer' import customerService from '@/api/customer'
import departmentStaff from '@/components/common/departmentStaff.vue'
import customerService2 from '@/api/customer2'
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar'
export default defineComponent({ export default defineComponent({
components: {
departmentStaff
},
setup() { setup() {
const $q = useQuasar() const $q = useQuasar()
const state: any = reactive({ const state: any = reactive({
...@@ -149,12 +165,15 @@ export default defineComponent({ ...@@ -149,12 +165,15 @@ export default defineComponent({
getheight: 270, getheight: 270,
loading: false, loading: false,
UseStageName: [], UseStageName: [],
showDialog: false,
defaultArray: [],
dataTree: [],
}) })
const jumpBeforePage = () => { const jumpBeforePage = () => {
router.push({ router.push({
path: '/customerSetup', path: '/customerSetup',
query: { query: {
type:'phase' type: 'phase'
} }
}) })
} }
...@@ -220,8 +239,34 @@ export default defineComponent({ ...@@ -220,8 +239,34 @@ export default defineComponent({
position: 'top' 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(() => { onMounted(() => {
getList() getList()
getEmployeeData()
}) })
return { return {
state, state,
...@@ -230,7 +275,10 @@ export default defineComponent({ ...@@ -230,7 +275,10 @@ export default defineComponent({
getusestageName, getusestageName,
compare, compare,
stageManagement, 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