// import { ResultType } from '@/@types/enumHelper'
// import router from '@/router'
// import UserActions from '@/store/modules/user/actions'//{ UserActionsType }

// import { UserGetter } from '@/store/modules/user/getters'
// import { dispatchAction, getStoreGetter, setStoreState } from '@/store/utils'
// import message from '@/utils/message'
import { StaticConfig } from '@/config/app'
import { ref,reactive } from 'vue'
import customer2,{CutomerParams} from '@/api/customer2'

const CustomerModule = () => {
  const getCustomerList =(param:CutomerParams)=>{
    customer2.getCustomerList(param)
  }
  const title = ref(StaticConfig.appsuffix)

  const data = {
    columns:[{
        name: 'desc',
        label: '客户',
        align: 'left',
      },
      { name: 'calories', align: 'center', label: '客户阶段'},    
      { name: 'fat', label: '客户标签', align: 'left'},
      { name: 'carbs', label: '内容标签', align: 'left' },
      { name: 'protein', label: '创建时间', align: 'left' },
      { name: 'sodium', label: '负责人', align: 'left' },
      { name: 'calcium', label: '上次跟进', align: 'left' },
      { name: 'iron', label: '渠道活码来源', align: 'left'},
      { name: 'num', label: '7日内客户回复消息数', align: 'left'},
      { name: 'num', label: '7日内员工发送消息数', align: 'left'}],
      selected:[]
  }
  const msg = reactive({
    PageIndex: 1,
    PageSize: 10,
    rowsPerPage: 10,
    pageCount: 0,
    CorpName: '', //企业名称
    CustomerName: '', //备注名
    WeChatName: '', //昵称
    CustomerMobile: '', //手机号码
    CreateSTime: '', //创建开始时间
    CreateETime: '', //创建结束时间
    FriendSTime: '', //好友开始时间
    FriendETime: '', //好友结束时间
    Q_NotFollowUpDay: 0, //几天未跟进
    Q_Friends: '', //好友关系 多选逗号分隔、
    Q_AddWay: '', //获取来源 多选英文逗号分隔
    EmpId: 0, //员工id
    CustomerType: 0, //类型1微信用户 2企业微信用户
    SelectList: [], //自定义查询
    OrderBy: 1, //排序
    AddCondition: 0 //查询条件
  })
  const TypeList = reactive([{
    Name:'企业',
    Id:0
  },{
    Name:'姓名',
    Id:1
  },{
    Name:'备注名',
    Id:2
  },{
    Name:'电话',
    Id:3
  },{
    Name:'昵称',
    Id:4
  }])
  const SeletObj = reactive({
    selectVal:'',
    selectWay:''
  })
  //选择方式
  const getSelectWay = () => {
   
    console.log(SeletObj);
    // if(this.SeletObj.selectWay){

    // }
  }

  return { getCustomerList,data,msg,title,TypeList,SeletObj,getSelectWay}
}

export default CustomerModule
