Commit 8acb4f83 authored by zhengke's avatar zhengke

1

parent 38089aef
...@@ -49,6 +49,15 @@ class CustomerService { ...@@ -49,6 +49,15 @@ class CustomerService {
data data
}) })
} }
//获取途径下拉数据
static async getWayList(data: any): Promise<HttpResponse> {
return Axios('/QYCustomer/GetCustomerAddWayEnumList', {
method: 'post',
responseType: 'json',
data
})
}
} }
export {CutomerParams} export {CutomerParams}
export default CustomerService export default CustomerService
...@@ -15,6 +15,13 @@ interface Params { ...@@ -15,6 +15,13 @@ interface Params {
interface timeParams { interface timeParams {
timeWay: number timeWay: number
} }
interface customParams {
customWay: number
}
interface friendParams {
frendArr: Array<number>
wayArr: Array<number>
}
const CustomerModule = () => { const CustomerModule = () => {
//调用方法 //调用方法
const getCustomerList =(param:CutomerParams)=>{ const getCustomerList =(param:CutomerParams)=>{
...@@ -26,11 +33,22 @@ const CustomerModule = () => { ...@@ -26,11 +33,22 @@ const CustomerModule = () => {
} }
}) })
} }
//调用获取下拉
const getWayList =(param:any)=>{
customer2.getWayList(param).then(res=>{
console.log(res,'下拉数据');
if(res.data.Code==1){
data.WayList = res.data.Data;
}
})
}
const title = ref(StaticConfig.appsuffix) const title = ref(StaticConfig.appsuffix)
//控制页显示条数 //控制页显示条数
const pagination = reactive({ const pagination = reactive({
rowsPerPage:0 rowsPerPage:0
}) })
//日期对象
// const daySelect =
const data = reactive({ const data = reactive({
columns:[{ columns:[{
name: 'CustomerName', name: 'CustomerName',
...@@ -51,7 +69,8 @@ const CustomerModule = () => { ...@@ -51,7 +69,8 @@ const CustomerModule = () => {
{ name: 'CheckInNum', label: '签到拜访', field:'CheckInNum', align: 'left'}, { name: 'CheckInNum', label: '签到拜访', field:'CheckInNum', align: 'left'},
], ],
selected:[], selected:[],
dataList:[] dataList:[],
WayList:[]
}) })
const msg = reactive({ const msg = reactive({
PageIndex: 1, PageIndex: 1,
...@@ -94,12 +113,40 @@ const CustomerModule = () => { ...@@ -94,12 +113,40 @@ const CustomerModule = () => {
Name:'好友添加时间', Name:'好友添加时间',
Id:2 Id:2
}]) }])
//自定义客户筛选
const CustomList = reactive([{
Name:'好友关系',
Id:1
},{
Name:'获取途径',
Id:2
},{
Name:'未跟进客户',
Id:3
}])
const friendOptions = reactive([{
Name:'好友客户',
Id:1
},{
Name:'待添加',
Id:2
},{
Name:'已申请',
Id:3
}])
const SeletObj:Params = reactive({ const SeletObj:Params = reactive({
selectVal:'', selectVal:'',
selectWay:0 selectWay:0
}) })
const TimeObj:timeParams = reactive({ const TimeObj:timeParams = reactive({
timeWay:0 timeWay:1
})
const customSetObj:customParams = reactive({
customWay:1
})
const friendObj:friendParams = reactive({
frendArr:[],
wayArr:[]
}) })
//选择方式 //选择方式
const getSelectWay = () => { const getSelectWay = () => {
...@@ -121,11 +168,16 @@ const CustomerModule = () => { ...@@ -121,11 +168,16 @@ const CustomerModule = () => {
msg.CustomerMobile = SeletObj.selectVal; msg.CustomerMobile = SeletObj.selectVal;
} }
} }
const getSelectTime = () =>{
console.log(TimeObj,'TimeObj');
}
const changePage = (val:any) => { const changePage = (val:any) => {
console.log(val); msg.PageIndex = val;
getCustomerList(msg);
} }
return { getCustomerList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination} return { getCustomerList,getWayList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination,getSelectTime,
CustomList,customSetObj,friendObj,friendOptions}
} }
export default CustomerModule export default CustomerModule
...@@ -11,23 +11,114 @@ ...@@ -11,23 +11,114 @@
</template> </template>
</q-input> </q-input>
</div> </div>
<div class="col-3"> <div class="col-2">
<!-- <q-select filled style="width:120px;" @update:model-value="getSelectTime" option-value="Id" option-label="Name" v-model="TimeObj.timeWay" <q-select filled @update:model-value="getSelectTime" option-value="Id" option-label="Name" v-model="TimeObj.timeWay"
:options="TimeList" emit-value map-options /> :options="TimeList" emit-value map-options />
<q-date v-model="days" multiple /> -->
</div> </div>
<template v-if="TimeObj.timeWay==1">
<div class="col-2">
<q-input filled v-model="msg.CreateSTime" mask="date" placeholder="创建时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.CreateSTime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-2">
<q-input filled v-model="msg.CreateETime" mask="date" placeholder="创建时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.CreateETime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
</template>
<template v-if="TimeObj.timeWay==2">
<div class="col-2">
<q-input filled v-model="msg.FriendSTime" mask="date" placeholder="添加时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.FriendSTime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-2">
<q-input filled v-model="msg.FriendETime" mask="date" placeholder="添加时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" cover transition-show="scale" transition-hide="scale">
<q-date v-model="msg.FriendETime">
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
</template>
<div class="col-2">
<q-select filled option-value="Id" option-label="Name" v-model="customSetObj.customWay"
:options="CustomList" emit-value map-options />
</div>
<div class="col-2" v-if="customSetObj.customWay==1">
<q-select filled label="请选择" use-chips
option-value="Id" option-label="Name" :options="friendOptions" v-model="friendObj.frendArr" multiple />
</div> </div>
<div class="col-2" v-if="customSetObj.customWay==2">
<q-select filled label="请选择" use-chips
option-value="Id" option-label="Name" :options="data.WayList" v-model="friendObj.wayArr" multiple />
</div> </div>
<div class="page-content"> <div class="col-2" v-if="customSetObj.customWay==3">
<q-input filled v-model="msg.Q_NotFollowUpDay" label='请输入天数'></q-input>
</div>
</div>
</div>
<div class="page-content" style="margin-top:20px;">
<q-table :rows="data.dataList" <q-table :rows="data.dataList"
:columns="data.columns" :columns="data.columns"
class="my-sticky-header-column-table" class="my-sticky-header-column-table"
row-key="name" row-key="name"
v-model:pagination="pagination" v-model:pagination="pagination"
selection="multiple"> selection="multiple">
<template v-slot:body-cell-CustomerName="props">
<q-td auto-width :props="props">
<div class="cutomer_Header">
<div class="customer_Img">
<img :src="props.row.WeChatPhoto" style="width:100%;height:100%" />
</div>
<div>
<div class="cutomer_Free">{{props.row.CustomerName}}</div>
<div class="customer_Wechat">{{props.row.WeChatName}}</div>
</div>
</div>
</q-td>
</template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount" <q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.pageCount"
:input="true" @input="changePage" /> :input="true" @update:model-value="changePage" />
</template> </template>
</q-table> </q-table>
</div> </div>
...@@ -41,13 +132,16 @@ ...@@ -41,13 +132,16 @@
export default defineComponent({ export default defineComponent({
setup() { setup() {
let { let {
getCustomerList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination getCustomerList,getWayList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination,getSelectTime,
CustomList,customSetObj,friendObj,friendOptions
} = CustomerModule() } = CustomerModule()
onMounted(()=>{ onMounted(()=>{
getCustomerList(msg) getCustomerList(msg)
getWayList({})
}) })
return { return {
getCustomerList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination getCustomerList,getWayList,data,msg,title,TypeList,SeletObj,getSelectWay,TimeObj,TimeList,changePage,pagination,getSelectTime,
CustomList,customSetObj,friendObj,friendOptions
} }
} }
}) })
...@@ -59,5 +153,21 @@ ...@@ -59,5 +153,21 @@
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.cutomer_Header{
display:flex;
}
.customer_Img{
width:40px;
height:40px;
border-radius: 5px;
overflow: hidden;
margin-right:14px;
}
.cutomer_Free{
color:#3470ff;
font-size:14px;
}
.customer_Wechat{
color:#9999a8;
}
</style> </style>
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