shengxuefei преди 4 години
родител
ревизия
beeeba5945
променени са 9 файла, в които са добавени 3122 реда и са изтрити 1307 реда
  1. 19 1
      build/webpack.base.conf.js
  2. 2468 1108
      package-lock.json
  3. 11 8
      package.json
  4. 9 0
      src/common/api/loginApi.js
  5. 324 0
      src/components/addsaclientcontact.vue
  6. 279 186
      src/components/clientdetail.vue
  7. 1 1
      src/components/saleindex.vue
  8. 3 1
      src/main.js
  9. 8 2
      src/router/index.js

+ 19 - 1
build/webpack.base.conf.js

@@ -2,6 +2,7 @@
 const path = require('path')
 const utils = require('./utils')
 const config = require('../config')
+const VueLoaderPlugin = require('vue-loader/lib/plugin')
 const vueLoaderConfig = require('./vue-loader.conf')
 
 function resolve (dir) {
@@ -31,6 +32,9 @@ module.exports = {
       ? config.build.assetsPublicPath
       : config.dev.assetsPublicPath
   },
+  plugins: [
+        new VueLoaderPlugin()
+    ],
   resolve: {
     extensions: ['.js', '.vue', '.json'],
     alias: {
@@ -41,6 +45,10 @@ module.exports = {
   module: {
     rules: [
       //...(config.dev.useEslint ? [createLintingRule()] : []),
+      {
+            test: /\.html$/,
+            use: 'html-loader'
+        }, 
       {
         test: /\.vue$/,
         loader: 'vue-loader',
@@ -74,7 +82,11 @@ module.exports = {
           limit: 10000,
           name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
         }
-      },      
+      },
+      {
+        test: /\.css$/i,
+        use: ["style-loader", "css-loader"],
+      },
       {
         test: /\.less$/,
         use: [
@@ -96,6 +108,12 @@ module.exports = {
           },
         ],
       },
+      {
+            test: /\.sass$/,
+            // loader: 'style-loader!css-loader!sass-loader',
+            //loader 的解析从后向前解析
+            use: [ 'vue-style-loader', 'css-loader', 'sass-loader' ]
+      },
       {
         test: / \.scss$ / ,
         loaders: [ 'style' , 'css' , 'sass' ]

Файловите разлики са ограничени, защото са твърде много
+ 2468 - 1108
package-lock.json


+ 11 - 8
package.json

@@ -12,8 +12,8 @@
   },
   "dependencies": {
     "axios": "^0.21.1",
-    "css-loader": "^3.6.0",
-    "decimal": "0.0.2",
+    "css-loader": "^3.5.3",
+    "decimal.js": "^10.2.1",
     "vant": "^2.12.9",
     "vue": "^2.5.2",
     "vue-router": "^3.0.1",
@@ -46,10 +46,11 @@
     "file-loader": "^1.1.4",
     "font-awesome": "^4.7.0",
     "friendly-errors-webpack-plugin": "^1.6.1",
-    "html-webpack-plugin": "^2.30.1",
+    "html-webpack-plugin": "^4.3.0",
     "less": "^3.13.1",
     "less-loader": "^5.0.0",
     "node-notifier": "^5.1.2",
+    "node-sass": "^5.0.0",
     "optimize-css-assets-webpack-plugin": "^3.2.0",
     "ora": "^1.2.0",
     "portfinder": "^1.0.13",
@@ -58,17 +59,19 @@
     "postcss-url": "^7.2.1",
     "rimraf": "^2.6.0",
     "sass": "^1.32.8",
+    "sass-loader": "^9.0.3",
     "semver": "^5.3.0",
     "shelljs": "^0.7.6",
-    "style-loader": "^2.0.0",
+    "style-loader": "^1.2.1",
     "uglifyjs-webpack-plugin": "^1.1.1",
     "url-loader": "^0.5.8",
-    "vue-loader": "^13.3.0",
-    "vue-style-loader": "^3.1.2",
+    "vue-loader": "^15.9.2",
+    "vue-style-loader": "^4.1.2",
     "vue-template-compiler": "^2.5.2",
-    "webpack": "^3.12.0",
+    "webpack": "^4.46.0",
     "webpack-bundle-analyzer": "^2.9.0",
-    "webpack-dev-server": "^2.9.1",
+    "webpack-cli": "^3.3.12",
+    "webpack-dev-server": "^3.11.0",
     "webpack-merge": "^4.1.0"
   },
   "engines": {

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

@@ -175,4 +175,13 @@ export function GetSaClientInfo(data) {
     method: 'post',
     data
   })
+}
+
+/* 新增客户跟进 */
+export function AddSaClientContact(data) {
+  return request({
+    url: '/AddSaClientContact',
+    method: 'post',
+    data
+  })
 }

+ 324 - 0
src/components/addsaclientcontact.vue

@@ -0,0 +1,324 @@
+<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>
+    </van-nav-bar>
+
+    <van-form @submit="onSubmit">
+      <van-field
+        v-model="name"
+        name="客户姓名"
+        label="客户姓名"
+        placeholder="客户姓名"
+        readonly
+        input-align="right"
+      />
+      <van-cell
+        title="访问类型"
+        :value="visitType"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showVisitType = true"
+      ></van-cell>
+      <van-popup v-model="showVisitType" round position="bottom">
+        <van-picker
+          show-toolbar
+          title="选择访问类型"
+          value-key="keyValue"
+          :columns="visitTypeData"
+          @cancel="showVisitType = false"
+          @confirm="onConfirm"
+        />
+      </van-popup>
+
+      <van-cell
+        title="接待日期"
+        :value="visitDate"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showVisitDate = true"
+      ></van-cell>
+      <van-popup v-model="showVisitDate" round position="bottom">
+        <van-datetime-picker
+          v-model="currentDate"
+          type="date"
+          title="选择年月日"
+          :min-date="minDate"
+          :max-date="maxDate"
+        />
+      </van-popup>
+      <van-cell
+        title="接待时间"
+        :value="visitTime"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showTime = true"
+      ></van-cell>
+      <van-popup v-model="showTime" round position="bottom">
+        <van-datetime-picker
+          v-model="currentTime"
+          type="time"
+          title="选择时间"
+          :min-hour="10"
+          :max-hour="20"
+        />
+      </van-popup>
+      <van-cell
+        title="意向强度"
+        :value="intention"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showintention = true"
+      ></van-cell>
+      <van-popup v-model="showintention" round position="bottom">
+        <van-picker
+          show-toolbar
+          title="选择意向强度"
+          value-key="keyValue"
+          :columns="intentionData"
+          @cancel="showintention = false"
+          @confirm="onConfirmHouse"
+        />
+      </van-popup>
+      <van-field
+        v-model="remark"
+        rows="1"
+        autosize
+        label="接待信息"
+        type="textarea"
+        placeholder="请输入接待信息"
+      />
+      <van-cell
+        title="来访计划日期"
+        :value="planVisitDate"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showPlanVisitDate = true"
+      ></van-cell>
+      <van-popup v-model="showPlanVisitDate" round position="bottom">
+        <van-datetime-picker
+          v-model="planVisitDateSel"
+          type="date"
+          title="选择年月日"
+          :min-date="minDate"
+          :max-date="maxDate"
+        />
+      </van-popup>
+      <van-cell
+        title="下次接待日期"
+        :value="nextReceiveDate"
+        is-link
+        title-class="title1"
+        value-class="value1"
+        @click="showNextReceiveDate = true"
+      ></van-cell>
+      <van-popup v-model="showNextReceiveDate" round position="bottom">
+        <van-datetime-picker
+          v-model="nextReceiveDateSel"
+          type="date"
+          title="选择年月日"
+          :min-date="minDate"
+          :max-date="maxDate"
+        />
+      </van-popup>
+      <div style="margin: 16px">
+        <van-button round block type="info" native-type="submit"
+          >提交</van-button
+        >
+      </div>
+
+      <van-row class="bottom">
+        <van-col span="12" class="bgGrey">
+          <van-icon name="edit" />{{ completion }}
+        </van-col>
+        <van-col span="12" class="bgRed"
+          ><van-icon name="add-o" />新增跟进
+        </van-col>
+      </van-row>
+    </van-form>
+  </div>
+</template>
+
+<script>
+import {
+  GetSaClientContactList,
+  GetSaClientInfo,
+} from "@/common/api/loginApi.js";
+import Decimal from "decimal.js";
+export default {
+  name: "login",
+  data() {
+    return {
+      id: "",
+      name: "",
+      visitType: "", //访问类型
+      showVisitType: false,
+      remark: "", //接待信息
+      intention: "", //意向强度
+      planVisitDate: "", //来访计划日期
+      nextReceiveDate: "", //下次接待日期
+      visitDate: "", //接待日期
+      visitTime: "", //接待时间
+      actionType: "",
+
+      visitTypeData: [], //访问类型数组
+      minDate: new Date(2005, 0, 1),
+      maxDate: new Date(2025, 10, 1),
+      currentDate: new Date(),
+      currentTime: "",
+      showTime: false,
+      intentionData: [],
+      showPlanVisitDate: false,
+      planVisitDateSel: "",
+      showNextReceiveDate: false,
+      nextReceiveDateSel: "",
+      showVisitDate: false,
+      showintention: false,
+    };
+  },
+  created: function () {
+    console.info("created");
+    //console.info(this.$util);
+    this.$util.persistLogin(this);
+    this.id = this.$route.query.id;
+    this.name = this.$route.query.name;
+
+    //this.GetSaClientInfo();
+  },
+  computed: {
+    //计算属性
+    completion: function () {},
+  },
+  methods: {
+    //获取客户信息
+    GetSaClientInfo: function () {
+      var that = this;
+      var data = {
+        userCode: that.$store.state.data.userCode,
+        projectId: that.$store.state.projectId,
+        clientId: that.id,
+      };
+      console.info("data", data);
+      GetSaClientInfo(data).then((res) => {
+        console.info("GetSaClientInfo", res);
+        if (!res.result) {
+          that.$toast(res.msg);
+          return;
+        }
+        that.data2 = res.data;
+      });
+    },
+    onConfirm: function () {},
+    onConfirmHouse: function () {},
+    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 lang = "sass">
+.title1
+  color: #ccc
+  font-size: 15px
+
+  text-align: left
+  height: 30px
+
+.title2
+  color: #ff0000
+  text-align: left
+  font-size: 13px
+
+.infoTitle
+  color: #aaa
+  text-align: left
+
+.value1
+  color: #ff0000
+  font-size: 13px
+
+.infoValue
+  color: #0606af
+
+.size
+  font-size: 16px
+
+.header
+  margin-top: 10px
+  height: 70px
+  border-bottom: #cfcfcf solid 3px
+
+.titleClass
+  border-bottom: #000 solid 1px
+
+.van-tab
+  color: #ff0000
+
+.redColor
+  color: #ff0000
+
+.bgBlue
+  background: #a0a0f7
+  height: 30px
+  margin-top: 5px
+  padding-top: 5px
+
+.bgBill
+  height: 30px
+  border-bottom: #aaa solid 1px
+  padding-top: 5px
+
+.bottom
+  /* left:0; */
+  bottom: 0px
+  position: absolute
+  width: 100%
+
+.bgGrey
+  background: #999999
+  height: 35px
+  justify-content: center
+  padding-top: 5px
+
+.bgRed
+  background: #ff0000
+  height: 35px
+  justify-content: center
+  color: #ffffff
+  font-weight: 900
+  padding-top: 5px
+
+/deep/ .van-field__label {
+  color: #ccc
+  font-size: 15px
+</style>
+ 

+ 279 - 186
src/components/clientdetail.vue

@@ -20,183 +20,256 @@
       </template>
     </van-nav-bar>
     <van-row class="header">
-        <van-col span="14">
-            <van-row>
-                <van-col span="12">
-                    <!-- <van-image :src="require('@/assets/img/header.png')" width="60" height="60" /> -->
-                    <van-image :src="require('@/assets/img/header.png')" width="60" height="60" v-if="data2.Sex==0"/>
-                    <van-image :src="require('@/assets/img/male.jpg')" width="70" height="60" v-if="data2.Sex==1"/>
-                </van-col>
-                <van-col span="12">
-                    <van-col span="24" class="title1">{{name}}</van-col>
-                    <van-col span="24" class="title2">{{state}}</van-col>
-                </van-col>
-            </van-row>
-        </van-col>
-        <van-col span="10"></van-col>
+      <van-col span="14">
+        <van-row>
+          <van-col span="12">
+            <!-- <van-image :src="require('@/assets/img/header.png')" width="60" height="60" /> -->
+            <van-image
+              :src="require('@/assets/img/header.png')"
+              width="60"
+              height="60"
+              v-if="data2.Sex == 0"
+            />
+            <van-image
+              :src="require('@/assets/img/male.jpg')"
+              width="70"
+              height="60"
+              v-if="data2.Sex == 1"
+            />
+          </van-col>
+          <van-col span="12">
+            <van-col span="24" class="title1">{{ name }}</van-col>
+            <van-col span="24" class="title2">{{ state }}</van-col>
+          </van-col>
+        </van-row>
+      </van-col>
+      <van-col span="10"></van-col>
     </van-row>
-    <van-tabs v-model="activeName" >
-        <van-tab title="跟进记录" name="a" title-class="titleClass" >           
-            <van-cell v-for="item in data2.Contacts" :key="item.ccId" :title="item.VisitDate"  :value="item.VisitType" :to="'/getsaclientcontactinfo?id='+item.ccId" value-class="value1">
-                <template #icon>
-                    <van-icon name="volume-o" color="#ff0000"></van-icon>
-                </template>
-            </van-cell>
-        </van-tab>
-        <van-tab title="详细资料" name="b" title-class="titleClass">
-          <van-cell   title="联系电话"  :value="data2.Phone"  value-class="infoValue"  title-class="infoTitle"/>
-          <van-cell   title="业务员"  :value="data2.SalesManName"  value-class="infoValue" title-class="infoTitle" />      
-          <van-cell   title="国籍"  :value="data2.Nationality"  value-class="infoValue"  title-class="infoTitle"/>   
-          <van-cell   title="证件类型"  :value="data2.CredentialsType"  value-class="infoValue"  title-class="infoTitle"/>
-          <van-cell   title="证件号"  :value="data2.CredentialsId"  value-class="infoValue"  title-class="infoTitle"/>
-          <van-cell   title="出生日期"  :value="data2.Birth"  value-class="infoValue"  title-class="infoTitle"/>   
-          <van-cell   title="婚姻状况"  :value="data2.Marry"  value-class="infoValue"  title-class="infoTitle"/>
-          <van-cell   title="户籍"  :value="data2.Household"  value-class="infoValue"  title-class="infoTitle"/> 
-          <van-cell   title="联系地址"  :value="data2.Address"  value-class="infoValue"  title-class="infoTitle"/>    
-          <van-cell   title="邮编"  :value="data2.Post"  value-class="infoValue"  title-class="infoTitle"/>    
-          <van-cell   title="传真"  :value="data2.Fax"  value-class="infoValue"  title-class="infoTitle"/>   
-          <van-cell   title="电子邮件"  :value="data2.Email"  value-class="infoValue"  title-class="infoTitle"/>   
-          <van-cell   title="认知途径"  :value="data2.CognizeWay"  value-class="infoValue"  title-class="infoTitle"/>   
-          <van-cell   title="备注"  :value="data2.Remark"  value-class="infoValue"  title-class="infoTitle"/>               
-        </van-tab> 
-        <van-tab title="单据信息" name="c" title-class="titleClass">
-          <van-row class="bgBlue">
-            <van-col span="6" >日期</van-col> 
-            <van-col span="6">类型</van-col> 
-            <van-col span="8">物业名称</van-col> 
-            <van-col span="4">状态</van-col> 
-          </van-row>
-          <van-row v-for="item in data2.SaleBills" :key="item.BillId" class="bgBill">
-            <van-col span="6" >{{item.BillDate}}</van-col> 
-            <van-col span="6">{{item.BillType}}</van-col> 
-            <van-col span="8">{{item.RoomName}}</van-col> 
-            <van-col span="4">{{item.BillState}}</van-col> 
-          </van-row>
-        </van-tab>
-    </van-tabs>
-
-    <van-grid :column-num="2" class="bottom">
-      <van-grid-item >
-        <van-row style="width:100%;">
-          <van-col span="5"><van-icon name="edit"/></van-col>
-          <van-col span="19">资料完善{{completion}}</van-col>
+    <van-tabs v-model="activeName">
+      <van-tab title="跟进记录" name="a" title-class="titleClass">
+        <van-cell
+          v-for="item in data2.Contacts"
+          :key="item.ccId"
+          :title="item.VisitDate"
+          :value="item.VisitType"
+          :to="'/getsaclientcontactinfo?id=' + item.ccId"
+          value-class="value1"
+        >
+          <template #icon>
+            <van-icon name="volume-o" color="#ff0000"></van-icon>
+          </template>
+        </van-cell>
+      </van-tab>
+      <van-tab title="详细资料" name="b" title-class="titleClass">
+        <van-cell
+          title="联系电话"
+          :value="data2.Phone"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="业务员"
+          :value="data2.SalesManName"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="国籍"
+          :value="data2.Nationality"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="证件类型"
+          :value="data2.CredentialsType"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="证件号"
+          :value="data2.CredentialsId"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="出生日期"
+          :value="data2.Birth"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="婚姻状况"
+          :value="data2.Marry"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="户籍"
+          :value="data2.Household"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="联系地址"
+          :value="data2.Address"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="邮编"
+          :value="data2.Post"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="传真"
+          :value="data2.Fax"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="电子邮件"
+          :value="data2.Email"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="认知途径"
+          :value="data2.CognizeWay"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+        <van-cell
+          title="备注"
+          :value="data2.Remark"
+          value-class="infoValue"
+          title-class="infoTitle"
+        />
+      </van-tab>
+      <van-tab title="单据信息" name="c" title-class="titleClass">
+        <van-row class="bgBlue">
+          <van-col span="6">日期</van-col>
+          <van-col span="6">类型</van-col>
+          <van-col span="8">物业名称</van-col>
+          <van-col span="4">状态</van-col>
         </van-row>
-      </van-grid-item>
-      <van-grid-item >
-         <van-row style="width:100%;">
-          <van-col span="5"><van-icon name="add-o"/></van-col>
-          <van-col span="19">新增跟进</van-col>
+        <van-row
+          v-for="item in data2.SaleBills"
+          :key="item.BillId"
+          class="bgBill"
+        >
+          <van-col span="6">{{ item.BillDate }}</van-col>
+          <van-col span="6">{{ item.BillType }}</van-col>
+          <van-col span="8">{{ item.RoomName }}</van-col>
+          <van-col span="4">{{ item.BillState }}</van-col>
         </van-row>
-      </van-grid-item>
-    </van-grid>
+      </van-tab>
+    </van-tabs>
+
+    <van-row class="bottom">
+      <van-col span="12" class="bgGrey">
+        <van-icon name="edit" />{{ completion }}
+      </van-col>
+      <van-col span="12" class="bgRed" @click="AddSaClientContact">
+        <van-icon name="add-o" />新增跟进
+      </van-col>
+    </van-row>
   </div>
 </template>
 
 <script>
-import { GetSaClientContactList,GetSaClientInfo } from "@/common/api/loginApi.js";
-import {Decimal} from 'decimal'
+import {
+  GetSaClientContactList,
+  GetSaClientInfo,
+} from "@/common/api/loginApi.js";
+import Decimal from "decimal.js";
 export default {
   name: "login",
   data() {
     return {
-        id:'',
-        name:'',
-        state:'',
-        activeName:'a',
-        
-        data2:{},      //详细资料
-      
+      id: "",
+      name: "",
+      state: "",
+      activeName: "a",
+
+      data2: {}, //详细资料
     };
   },
   created: function () {
     console.info("created");
     //console.info(this.$util);
     this.$util.persistLogin(this);
-    this.id=this.$route.query.id;
-    this.name=this.$route.query.name;
-    this.state=this.$route.query.state;
-   
+    this.id = this.$route.query.id;
+    this.name = this.$route.query.name;
+    this.state = this.$route.query.state;
+
     this.GetSaClientInfo();
   },
-  computed:{   //计算属性
-    completion:function(){
-       let sum=14;
-       let success=0;
-       if(this.data2==null){
-         return 0;
-       }
-       if(!this.$util.isEmpty(this.data2.Phone))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.SalesManName))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Nationality))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.CredentialsType))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.CredentialsId))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Birth))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Marry))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Household))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Address))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Post))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Fax))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Email))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.CognizeWay))
-       {
-         success++;
-       }
-        if(!this.$util.isEmpty(this.data2.Remark))
-       {
-         success++;
-       }
-       console.info('compute success',success);
-       let result =new Decimal(success).div(new Decimal(sum)).toFixed(1);
-       console.info('compute',result);
-       return result;
-    }
-   
+  computed: {
+    //计算属性
+    completion: function () {
+      let sum = 14;
+      let success = 0;
+      if (this.data2 == null) {
+        return 0;
+      }
+      if (!this.$util.isEmpty(this.data2.Phone)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.SalesManName)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Nationality)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.CredentialsType)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.CredentialsId)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Birth)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Marry)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Household)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Address)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Post)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Fax)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Email)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.CognizeWay)) {
+        success++;
+      }
+      if (!this.$util.isEmpty(this.data2.Remark)) {
+        success++;
+      }
+      console.info("compute success", success);
+      //console.info("compute success", Decimal(success));
+      let result = Decimal(success).div(Decimal(sum)).toFixed(1) * 100;
+      console.info("compute", result);
+      return "资料完善度" + result + "%";
+    },
   },
   methods: {
-   
     //获取客户信息
     GetSaClientInfo: function () {
       var that = this;
       var data = {
-        userCode:that.$store.state.data.userCode,
+        userCode: that.$store.state.data.userCode,
         projectId: that.$store.state.projectId,
-        clientId:that.id       
+        clientId: that.id,
       };
       console.info("data", data);
       GetSaClientInfo(data).then((res) => {
@@ -205,11 +278,17 @@ export default {
           that.$toast(res.msg);
           return;
         }
-        that.data2=res.data;
+        that.data2 = res.data;
+      });
+    },
+    AddSaClientContact: function () {
+      //新增跟进按钮点击事件
+      var that = this;
+      this.$router.push({
+        path: "/addsaclientcontact",
+        query: { id: that.id, name: that.name },
       });
     },
-     
-   
     onClickLeft() {
       // this.$toast('返回')
       console.info("left");
@@ -226,59 +305,73 @@ export default {
 <style scoped>
 .title1 {
   color: #000;
-  font-size:18px;
-  font-weight:900;
+  font-size: 18px;
+  font-weight: 900;
   text-align: left;
-  height:30px;
+  height: 30px;
 }
-.title2{
-    color:#ff0000;
-     text-align: left;
-     font-size:13px;
+.title2 {
+  color: #ff0000;
+  text-align: left;
+  font-size: 13px;
 }
-.infoTitle{
-  color:#aaa;
+.infoTitle {
+  color: #aaa;
   text-align: left;
 }
 .value1 {
   color: #ff0000;
   font-size: 13px;
 }
-.infoValue{
-  color:#0606af;
+.infoValue {
+  color: #0606af;
 }
-.size{
-    font-size:16px;
+.size {
+  font-size: 16px;
 }
-.header{
-    margin-top:10px;
-    height: 70px;
-    border-bottom: #cfcfcf solid 3px;
+.header {
+  margin-top: 10px;
+  height: 70px;
+  border-bottom: #cfcfcf solid 3px;
 }
-.titleClass{
-    border-bottom: #000 solid 1px;
+.titleClass {
+  border-bottom: #000 solid 1px;
 }
-.van-tab{
-    color:#ff0000;
+.van-tab {
+  color: #ff0000;
 }
-.redColor{
-    color:#ff0000;
+.redColor {
+  color: #ff0000;
 }
-.bgBlue{
+.bgBlue {
   background: #a0a0f7;
-  height:30px;
-  margin-top:5px;
-  padding-top:5px;
+  height: 30px;
+  margin-top: 5px;
+  padding-top: 5px;
 }
-.bgBill{
+.bgBill {
   height: 30px;
   border-bottom: #aaa solid 1px;
-  padding-top:5px;
+  padding-top: 5px;
 }
-.bottom{
+.bottom {
   /* left:0; */
   bottom: 0px;
-  position:absolute;
-  width:100%;
+  position: absolute;
+  width: 100%;
+}
+.bgGrey {
+  background: #999999;
+  height: 35px;
+  justify-content: center;
+  padding-top: 5px;
+}
+.bgRed {
+  background: #ff0000;
+  height: 35px;
+  justify-content: center;
+  color: #ffffff;
+  font-weight: 900;
+  padding-top: 5px;
 }
 </style>

+ 1 - 1
src/components/saleindex.vue

@@ -155,7 +155,7 @@
 
 <script>
 import { SaReportToday } from "@/common/api/loginApi.js";
-import Decimal from "decimal";
+import Decimal from "decimal.js";
 export default {
   name: "login",
   data() {

+ 3 - 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,Picker,Popup ,Tab, Tabs
+  NavBar, RadioGroup, Radio, Cell, CellGroup, Grid, GridItem, Image as VanImage, Circle, Icon, List, Divider, PullRefresh, Picker, Popup, Tab, Tabs, Calendar, DatetimePicker
 } from 'vant'
 
 // 引入全局css
@@ -50,6 +50,8 @@ Vue.use(Button)
   .use(Popup)
   .use(Tab)
   .use(Tabs)
+  .use(Calendar)
+  .use(DatetimePicker)
 
 /* eslint-disable no-new */
 new Vue({

+ 8 - 2
src/router/index.js

@@ -19,6 +19,7 @@ import getsaclientsummarylist from '@/components/getsaclientsummarylist'
 import filterhouse from '@/components/filterhouse'
 import getsaroomlist from '@/components/getsaroomlist'
 import clientdetail from '@/components/clientdetail'
+import addsaclientcontact from '@/components/addsaclientcontact'
 Vue.use(Router)
 
 export default new Router({
@@ -92,12 +93,12 @@ export default new Router({
       path: '/getsaclientcontactinfo',
       name: 'getsaclientcontactinfo',
       component: getsaclientcontactinfo
-    },  
+    },
     {     //客户分类汇总
       path: '/getsaclientsummary',
       name: 'getsaclientsummary',
       component: getsaclientsummary
-    }, 
+    },
     {     //客户分类清单
       path: '/getsaclientsummarylist',
       name: 'getsaclientsummarylist',
@@ -118,5 +119,10 @@ export default new Router({
       name: 'clientdetail',
       component: clientdetail
     },
+    {     //新增客户跟进
+      path: '/addsaclientcontact',
+      name: 'addsaclientcontact',
+      component: addsaclientcontact
+    },
   ]
 })