Pārlūkot izejas kodu

会员管理,客户分类

shengxuefei 4 gadi atpakaļ
vecāks
revīzija
a49387d112

+ 18 - 0
src/common/api/loginApi.js

@@ -130,4 +130,22 @@ export function GetSaClientContactInfo(data) {
     method: 'post',
     data
   })
+}
+
+/* 客户分类汇总 */
+export function GetSaClientSummary(data) {
+  return request({
+    url: '/GetSaClientSummary',
+    method: 'post',
+    data
+  })
+}
+
+/* 客户分类清单 */
+export function GetSaClientSummaryList(data) {
+  return request({
+    url: '/GetSaClientSummaryList',
+    method: 'post',
+    data
+  })
 }

+ 121 - 0
src/components/filterhouse.vue

@@ -0,0 +1,121 @@
+<template>
+  <div>
+    <van-nav-bar
+      @click-left="onClickLeft"
+      @click-right="onClickRight"
+      style="background-color: #1989fa"
+    >
+      <template #title>
+        <van-col style="color: #ffffff">筛选房源</van-col>
+      </template>
+      <template #left>
+        <i
+          class="fa fa-arrow-circle-left"
+          aria-hidden="true"
+          style="color: #ffffff; font-size: 18px"
+        ></i>
+      </template>
+      <template #right>
+        <van-icon name="replay" size="18" color="#ffffff" />
+      </template>
+    </van-nav-bar>
+    <van-form @submit="onSubmit">
+        <van-cell title="楼栋" value="请选择" is-link title-class="title1" value-class="value1"></van-cell>
+        <van-cell title="户型" value="请选择" is-link title-class="title1" value-class="value1"></van-cell>
+        <van-field
+            v-model="danyuan"
+            
+            label="单元号"
+            placeholder="请输入"
+            input-align="right"
+            label-class="title1"
+        />
+        <van-field
+            v-model="fangjian"
+            
+            label="房间号"
+            placeholder="请输入"
+            input-align="right"
+            label-class="title1"
+        />
+        <div style="margin: 16px;">
+            <van-button round block type="info" native-type="submit">查询</van-button>
+        </div>
+    </van-form>
+   
+  </div>
+</template>
+
+<script>
+import { GetSaClientSummary } from "@/common/api/loginApi.js";
+export default {
+  name: "login",
+  data() {
+    return {
+      data: [], 
+      danyuan:'',
+      fangjian:''
+      
+    };
+  },
+  created: function () {
+    console.info("created");
+    //console.info(this.$util);
+    this.$util.persistLogin(this);
+  },
+  computed:{   //计算属性
+    
+   
+  },
+  methods: {
+    GetSaClientSummary: function () {
+      var that = this;
+      var data = {
+        userCode: that.$store.state.data.userCode,
+        projectId: that.$store.state.projectId
+       
+      };
+      console.info("data", data);
+      GetSaClientSummary(data).then((res) => {
+        console.info("GetSaClientSummary", res);
+        if (!res.result) {
+          that.$toast(res.msg);
+          return;
+        }
+        res.data.forEach(function (item, index, array) {
+          that.$set(that.data, index, item);
+        });
+        that.loading = false;
+        that.finished = true;
+      });
+    },
+     onSubmit(values) {    //提交按钮
+      console.log('submit', values);
+    },
+    onClickLeft() {
+      // this.$toast('返回')
+      console.info("left");
+      this.$router.go(-1);
+    },
+    onClickRight() {
+      this.$router.go(0);
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+.title1 {
+  color: #999;
+  text-align: left;
+}
+.value1 {
+  color: #1732cf;
+  font-size: 18px;
+  font-weight: 800;
+}
+.size{
+    font-size:16px;
+}
+</style>

+ 11 - 2
src/components/getsaclientcontactinfo.vue

@@ -52,11 +52,16 @@
       />
       <van-cell
         title="意向强度"
-        :value="data.Intention"
+        
         title-class="title1"
         value-class="value1"
         size="large"
-      />
+      >
+      <template #default>
+        <span v-for="n in data.Intention" :key="n+'x'">★</span>
+        <span v-for="n in 5-data.Intention" :key="n">☆</span>
+      </template>
+      </van-cell>
       <van-cell
         title="来访计划日期"
         :value="data.PlanVisitDate"
@@ -153,4 +158,8 @@ export default {
     color:#0f0fa7;
     font-size:15px;
 }
+.size{
+    font-size:16px;
+    color:orange;
+}
 </style>

+ 13 - 5
src/components/getsaclientcontactlist.vue

@@ -37,15 +37,15 @@
             <van-col span="24" class="title1">{{item.ClientName}}</van-col>
             <van-col span="24">
                 <van-row>
-                    <van-col span="9">接待日期</van-col>
-                    <van-col span="15">{{item.ccVisitDate}} {{item.ccVisitTime}}</van-col>
+                    <van-col span="9" class="title2">接待日期</van-col>
+                    <van-col span="15" class="title2">{{item.ccVisitDate}} {{item.ccVisitTime}}</van-col>
                 </van-row>
                 </van-col>
             </template>
             <template #default>
                 <van-col span="24" class="star" > 
-                    <span v-for="i in listdata.ccIntention" :key="i">★</span>
-                
+                   <span v-for="i in item.ccIntention" :key="i+'x'" class="size">★</span>
+                   <span v-for="i in 5-item.ccIntention" :key="i" class="size">☆</span>
                 </van-col>
                 <van-col span="24">
                     <van-row>
@@ -160,6 +160,14 @@ export default {
     height:35px;
 }
 .star{
-    height:40px;
+    height:35px;
+}
+.size{
+    font-size:16px;
+    color:orange;
+}
+.title2{
+    color:#999;
+    
 }
 </style>

+ 131 - 0
src/components/getsaclientsummary.vue

@@ -0,0 +1,131 @@
+<template>
+  <div>
+    <van-nav-bar
+      @click-left="onClickLeft"
+      @click-right="onClickRight"
+      style="background-color: #1989fa"
+    >
+      <template #title>
+        <van-col style="color: #ffffff">客户</van-col>
+      </template>
+      <template #left>
+        <i
+          class="fa fa-arrow-circle-left"
+          aria-hidden="true"
+          style="color: #ffffff; font-size: 18px"
+        ></i>
+      </template>
+      <template #right>
+        <van-icon name="replay" size="18" color="#ffffff" />
+      </template>
+    </van-nav-bar>
+
+    <van-list
+      v-model="loading"
+      :finished="finished"
+      finished-text="已显示所有数据"
+      @load="GetSaClientSummary"
+    >
+      <van-cell
+        v-for="item in getData"
+        :key="item.saleState"
+        :title="item.saleState+'客户'"
+        :value="item.clientCount"
+        border
+        is-link
+        title-class="title1"
+        value-class="value1"
+        size="large"
+        @click="click1($event, item.saleState)"
+      >
+        <template #icon>
+          <i class="fa fa-heart size" aria-hidden="true" v-if="item.saleState=='问询'" style="color:red;"></i>
+          <i class="fa fa-plane size" aria-hidden="true" v-if="item.saleState=='认筹'"></i> 
+          <i class="fa fa-sort-alpha-desc size" aria-hidden="true" v-if="item.saleState=='排号'" style="color:green;"></i>
+          <i class="fa fa-bars size" aria-hidden="true" v-if="item.saleState=='预订'" style="color:orange;"></i>
+          <i class="fa fa-sellsy size" aria-hidden="true" v-if="item.saleState=='认购'" style="color:#ff6600;"></i>
+          <i class="fa fa-list-alt size" aria-hidden="true" v-if="item.saleState=='签约'" style="color:#ff6600;"></i>
+          <i class="fa fa-product-hunt size" aria-hidden="true" v-if="item.saleState=='公共'" style="color:blue;"></i>
+        </template>
+      </van-cell>
+    </van-list>
+  </div>
+</template>
+
+<script>
+import { GetSaClientSummary } from "@/common/api/loginApi.js";
+export default {
+  name: "login",
+  data() {
+    return {
+      data: [], 
+      loading: false,
+      finished: false,
+    };
+  },
+  created: function () {
+    console.info("created");
+    //console.info(this.$util);
+    this.$util.persistLogin(this);
+  },
+  computed:{   //计算属性
+    getData:function(){
+        var arr=this.data.filter(function(item){
+            return item.visible==0;
+        });
+        console.info('arr',arr);
+        return arr;
+    }
+  },
+  methods: {
+    GetSaClientSummary: function () {
+      var that = this;
+      var data = {
+        userCode: that.$store.state.data.userCode,
+        projectId: that.$store.state.projectId
+       
+      };
+      console.info("data", data);
+      GetSaClientSummary(data).then((res) => {
+        console.info("GetSaClientSummary", res);
+        if (!res.result) {
+          that.$toast(res.msg);
+          return;
+        }
+        res.data.forEach(function (item, index, array) {
+          that.$set(that.data, index, item);
+        });
+        that.loading = false;
+        that.finished = true;
+      });
+    },
+    // 行选择点击跳转
+    click1: function (event, saleState) {
+      //console.info("click1 event", event);
+        this.$router.push({path:'/getsaclientsummarylist',query:{saleState:saleState}});
+    },
+    onClickLeft() {
+      // this.$toast('返回')
+      console.info("left");
+      this.$router.go(-1);
+    },
+    onClickRight() {
+      this.$router.go(0);
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+.title1 {
+  color: #999;
+}
+.value1 {
+  color: #999;
+  font-size: 18px;
+}
+.size{
+    font-size:16px;
+}
+</style>

+ 182 - 0
src/components/getsaclientsummarylist.vue

@@ -0,0 +1,182 @@
+<template>
+  <div>
+    <van-nav-bar
+      @click-left="onClickLeft"
+      @click-right="onClickRight"
+      style="background-color: #1989fa"
+    >
+      <template #title>
+        <van-col style="color: #ffffff">{{titleName}}</van-col>
+      </template>
+      <template #left>
+        <i
+          class="fa fa-arrow-circle-left"
+          aria-hidden="true"
+          style="color: #ffffff; font-size: 18px"
+        ></i>
+      </template>
+      <template #right>
+        <van-icon name="replay" size="18" color="#ffffff" />
+      </template>
+    </van-nav-bar>
+
+    <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
+      <van-list
+        v-model="loading"
+        :finished="finished"
+        loading-text="加载中..."
+        finished-text="我是有底线的~"
+        @load="onLoad"
+      >
+        <van-cell
+          v-for="item in listdata"
+          :key="item.clientId"
+          
+        >
+          <template #title>
+            <van-col span="24" class="title1">{{item.name}}</van-col>
+            <van-col span="24" class="title2">
+                业务员:{{item.cUserName}}
+             </van-col>
+            </template>
+            <template #default>
+                <van-col span="24" class="star" > 
+                   <span v-for="i in item.intention" :key="i+'x'" class="size">★</span>
+                   <span v-for="i in 5-item.intention" :key="i" class="size">☆</span>
+                </van-col>
+                <van-col span="24" v-if="item.visitdate!=''" class="title3">
+                   最后接待:{{item.visitdate}}
+                </van-col>
+            </template>
+        </van-cell>
+      </van-list>
+    </van-pull-refresh>
+  </div>
+</template>
+
+<script>
+import { GetSaClientSummaryList } from "@/common/api/loginApi.js";
+export default {
+  name: "login",
+  data() {
+    return {
+      listdata: [], 
+      loading: false,
+      finished: false,
+      isLoading: false,
+      page:"1"
+    };
+  },
+  created: function () {
+    console.info("created");
+    //console.info(this.$util);
+    this.$util.persistLogin(this);
+  },
+  computed:{  //计算属性
+      titleName:function(){
+          return this.$route.query.saleState+'客户';
+      },
+      
+  },
+  methods: {
+    GetSaClientSummaryList: function () {
+      var that = this;
+      var data = {
+        userCode: that.$store.state.data.userCode,
+        projectId: that.$store.state.projectId,
+        page: that.page,
+        pageCount: "10",
+        saleState:that.$route.query.saleState,
+        jsonQuery: "",
+        sortby: "",
+      };
+      console.info("data", data);
+      GetSaClientSummaryList(data).then((res) => {
+        console.info("GetSaClientSummaryList", res);
+        if (!res.result) {
+          that.$toast(res.msg);
+          return;
+        }
+        if(res.data!=null&&res.data.listdata.length>0){
+          that.loading=false;
+          res.data.listdata.forEach(function (item, index, array) {
+            that.listdata.push(item);
+            //console.info('length:'+res.data.listdata.length,'index:'+index);
+            if(res.data.listdata.length-1==index){
+              that.page++;
+              if(res.data.page.totalPages==that.page-1){
+                that.finished=true;
+              }
+            }
+          });
+          if(res.data==null||res.data.listdata==null||res.data.listdata.length==0){
+            that.finished = true;
+          }
+          
+        }
+         else{
+          that.finished=true;
+        }
+      });
+    },
+    // 列表加载
+    onLoad () {
+      setTimeout(() => {
+        this.GetSaClientSummaryList()
+        this.loading = true
+      }, 500)
+    },
+    onRefresh () {
+      setTimeout(() => {
+        // 重新初始化这些属性
+        this.isLoading = false
+        this.listdata = []
+        this.page = 1
+        this.loading = false
+        this.finished = false
+        //this.noData = false
+        // 请求信息
+        this.GetSaClientSummaryList()
+      }, 500)
+    },
+    onClickLeft() {
+      // this.$toast('返回')
+      console.info("left");
+      this.$router.go(-1);
+    },
+    onClickRight() {
+      this.$router.go(0);
+    },
+   
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+.title1 {
+   color:#0f0fa7;
+    font-size:16px;
+    font-weight:900;
+    text-align: left;
+    
+    height:35px;
+}
+.title2{
+    color:#999;
+    text-align: left;
+    height:25px;
+}
+.title3{
+    color:#999;
+    text-align: right;
+    height:25px;
+}
+.star{
+    height:35px;
+}
+.size{
+    font-size:16px;
+    color:orange;
+}
+</style>

+ 11 - 1
src/components/saleindex.vue

@@ -92,7 +92,7 @@
         </router-link>
       </van-grid-item>
       <van-grid-item>
-        <router-link to="/getoverduesummary" >
+        <router-link to="/filterhouse" >
           <van-image
             :src="require('@/assets/img/house.jpg')"
             width="50"
@@ -133,6 +133,16 @@
           <van-col span="24">辩客查询</van-col>
         </router-link>
       </van-grid-item>
+      <van-grid-item>
+        <router-link to="/getsaclientsummary" >
+          <van-image
+            :src="require('@/assets/img/wechat.jpg')"
+            width="50"
+            height="50"
+          />
+          <van-col span="24">会员管理</van-col>
+        </router-link>
+      </van-grid-item>
     </van-grid>
   </div>
 </template>

+ 2 - 1
src/main.js

@@ -13,7 +13,7 @@ import {
   Form,
   Col,
   Row,
-  NavBar, RadioGroup, Radio, Cell, CellGroup, Grid, GridItem, Image as VanImage, Circle, Icon, List, Divider, PullRefresh
+  NavBar, RadioGroup, Radio, Cell, CellGroup, Grid, GridItem, Image as VanImage, Circle, Icon, List, Divider, PullRefresh,Picker 
 } from 'vant'
 
 // 引入全局css
@@ -46,6 +46,7 @@ Vue.use(Button)
   .use(List)
   .use(Divider)
   .use(PullRefresh)
+  .use(Picker)
 
 /* eslint-disable no-new */
 new Vue({

+ 18 - 0
src/router/index.js

@@ -14,6 +14,9 @@ import getsabuildingstruct from '@/components/getsabuildingstruct'
 import getsaroominfo from '@/components/getsaroominfo'
 import getsaclientcontactlist from '@/components/getsaclientcontactlist'
 import getsaclientcontactinfo from '@/components/getsaclientcontactinfo'
+import getsaclientsummary from '@/components/getsaclientsummary'
+import getsaclientsummarylist from '@/components/getsaclientsummarylist'
+import filterhouse from '@/components/filterhouse'
 Vue.use(Router)
 
 export default new Router({
@@ -87,6 +90,21 @@ export default new Router({
       path: '/getsaclientcontactinfo',
       name: 'getsaclientcontactinfo',
       component: getsaclientcontactinfo
+    },  
+    {     //客户分类汇总
+      path: '/getsaclientsummary',
+      name: 'getsaclientsummary',
+      component: getsaclientsummary
+    }, 
+    {     //客户分类清单
+      path: '/getsaclientsummarylist',
+      name: 'getsaclientsummarylist',
+      component: getsaclientsummarylist
+    },
+    {     //筛选房源
+      path: '/filterhouse',
+      name: 'filterhouse',
+      component: filterhouse
     },
   ]
 })