liujq 3 gadi atpakaļ
vecāks
revīzija
3ba05727be
41 mainītis faili ar 791 papildinājumiem un 5 dzēšanām
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.f5b6575f.css
  3. 0 0
      dist/static/css/chunk-3f16517a.e8505caa.css
  4. 0 0
      dist/static/css/chunk-626f4fda.35e5ee99.css
  5. 0 0
      dist/static/js/app.34662d66.js
  6. 0 0
      dist/static/js/app.8a66b0ba.js
  7. 0 0
      dist/static/js/chunk-02eb56e6.a69d020e.js
  8. 0 0
      dist/static/js/chunk-060a14dc.cbe9d8f1.js
  9. 0 0
      dist/static/js/chunk-07fc91a6.139e3b67.js
  10. 0 0
      dist/static/js/chunk-093b5b3c.40ee5270.js
  11. 0 0
      dist/static/js/chunk-0c6db779.f7abacfa.js
  12. 0 0
      dist/static/js/chunk-123a7196.fceabc62.js
  13. 0 0
      dist/static/js/chunk-17854054.bc435edc.js
  14. 0 0
      dist/static/js/chunk-18bdd0f6.d64dbbac.js
  15. 0 0
      dist/static/js/chunk-24b1b024.1a34f4f3.js
  16. 1 1
      dist/static/js/chunk-2d0ccfc9.c3f604d5.js
  17. 0 0
      dist/static/js/chunk-36ddeec9.79e44c77.js
  18. 0 0
      dist/static/js/chunk-3f16517a.115947c2.js
  19. 0 0
      dist/static/js/chunk-3f2695b2.cee81f3e.js
  20. 0 0
      dist/static/js/chunk-42505c22.eeee1034.js
  21. 0 0
      dist/static/js/chunk-43338aec.2da91c0d.js
  22. 0 0
      dist/static/js/chunk-45f420e2.9429fe54.js
  23. 0 0
      dist/static/js/chunk-593f9664.4bdcbd03.js
  24. 0 0
      dist/static/js/chunk-626f4fda.eaee1078.js
  25. 0 0
      dist/static/js/chunk-67a054c9.d5e59485.js
  26. 0 0
      dist/static/js/chunk-71c0268e.73353d23.js
  27. 0 0
      dist/static/js/chunk-7441b538.f035af04.js
  28. 0 0
      dist/static/js/chunk-7f8b33fa.8b4b4d0f.js
  29. 1 1
      dist/static/js/chunk-9c1e7474.bb9e6546.js
  30. 0 0
      dist/static/js/chunk-e0de387c.d5c7cb02.js
  31. 0 0
      dist/static/js/chunk-libs.7730e0c3.js
  32. 27 0
      src/api/user.js
  33. 18 3
      src/components/Common/BaseForm.vue
  34. 121 0
      src/views/cust/components/popup/IndexEdit.vue
  35. 121 0
      src/views/cust/components/popup/IndexRecord.vue
  36. 96 0
      src/views/cust/components/popup/LineupEdit.vue
  37. 92 0
      src/views/cust/components/popup/RecordEdit.vue
  38. 43 0
      src/views/cust/components/searchForm/Index.vue
  39. 35 0
      src/views/cust/components/searchForm/Lineup.vue
  40. 134 0
      src/views/cust/index.vue
  41. 102 0
      src/views/cust/lineup.vue

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.f5b6575f.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/chunk-3f16517a.e8505caa.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/chunk-626f4fda.35e5ee99.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.34662d66.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.8a66b0ba.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-02eb56e6.a69d020e.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-060a14dc.cbe9d8f1.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-07fc91a6.139e3b67.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-093b5b3c.40ee5270.js


+ 0 - 0
dist/static/js/chunk-0c6db779.0440e6d1.js → dist/static/js/chunk-0c6db779.f7abacfa.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-123a7196.fceabc62.js


+ 0 - 0
dist/static/js/chunk-17854054.ffa67197.js → dist/static/js/chunk-17854054.bc435edc.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-18bdd0f6.d64dbbac.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-24b1b024.1a34f4f3.js


+ 1 - 1
dist/static/js/chunk-2d0ccfc9.39e75c0a.js → dist/static/js/chunk-2d0ccfc9.c3f604d5.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ccfc9"],{"4fef":function(t,a,e){"use strict";e.r(a);var i=e("ade3"),r=e("5530");e("1276"),e("ac1f"),e("a9e3");a["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var a=Object(r["a"])({},this.searchForm);"ascending"===t.order?a.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):a.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.searchForm=Object(r["a"])({},a),this.fetchData(a)},fetchData:function(t){var a=this;if(this.apiStr){var e={page:this.currentPage,page_size:this.pageSize};t?e=Object(r["a"])(Object(r["a"])({},e),t):this.searchForm&&(e=Object(r["a"])(Object(r["a"])({},e),this.searchForm)),this.getDataBefore&&this.getDataBefore(e),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](e).then((function(t){return 1===a.currentPage&&(a.pageSize=t.page_size||1),a.totalRecords=t.total?Number(t.total):0,a.tableData=t.list||[],a.listLoading=!1,a.getMoreData&&a.getMoreData(t,e),t})).catch((function(t){a.listLoading=!1}))}}}}}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ccfc9"],{"4fef":function(t,a,e){"use strict";e.r(a);var i=e("ade3"),r=e("5530");e("ac1f"),e("1276"),e("a9e3");a["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var a=Object(r["a"])({},this.searchForm);"ascending"===t.order?a.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):a.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.searchForm=Object(r["a"])({},a),this.fetchData(a)},fetchData:function(t){var a=this;if(this.apiStr){var e={page:this.currentPage,page_size:this.pageSize};t?e=Object(r["a"])(Object(r["a"])({},e),t):this.searchForm&&(e=Object(r["a"])(Object(r["a"])({},e),this.searchForm)),this.getDataBefore&&this.getDataBefore(e),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](e).then((function(t){return 1===a.currentPage&&(a.pageSize=t.page_size||1),a.totalRecords=t.total?Number(t.total):0,a.tableData=t.list||[],a.listLoading=!1,a.getMoreData&&a.getMoreData(t,e),t})).catch((function(t){a.listLoading=!1}))}}}}}}]);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-36ddeec9.79e44c77.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-3f16517a.115947c2.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-3f2695b2.cee81f3e.js


+ 0 - 0
dist/static/js/chunk-42505c22.d9d3c466.js → dist/static/js/chunk-42505c22.eeee1034.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-43338aec.2da91c0d.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-45f420e2.9429fe54.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-593f9664.4bdcbd03.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-626f4fda.eaee1078.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-67a054c9.d5e59485.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-71c0268e.73353d23.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-7441b538.f035af04.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-7f8b33fa.8b4b4d0f.js


+ 1 - 1
dist/static/js/chunk-9c1e7474.74d18a95.js → dist/static/js/chunk-9c1e7474.bb9e6546.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9c1e7474","chunk-2d0ccfc9"],{"4fef":function(t,e,a){"use strict";a.r(e);var i=a("ade3"),c=a("5530");a("1276"),a("ac1f"),a("a9e3");e["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var e=Object(c["a"])({},this.searchForm);"ascending"===t.order?e.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):e.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.searchForm=Object(c["a"])({},e),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(c["a"])(Object(c["a"])({},a),t):this.searchForm&&(a=Object(c["a"])(Object(c["a"])({},a),this.searchForm)),this.getDataBefore&&this.getDataBefore(a),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](a).then((function(t){return 1===e.currentPage&&(e.pageSize=t.page_size||1),e.totalRecords=t.total?Number(t.total):0,e.tableData=t.list||[],e.listLoading=!1,e.getMoreData&&e.getMoreData(t,a),t})).catch((function(t){e.listLoading=!1}))}}}}},"9d49":function(t,e,a){"use strict";a.r(e),e["default"]={data:function(){return{bigImgSrc:"",bigImgShow:!1}},created:function(){},methods:{openbigImg:function(t){this.bigImgSrc=t,this.bigImgShow=!0},closebigImg:function(t){this.bigImgShow=!1}}}}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9c1e7474","chunk-2d0ccfc9"],{"4fef":function(t,e,a){"use strict";a.r(e);var i=a("ade3"),c=a("5530");a("ac1f"),a("1276"),a("a9e3");e["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var e=Object(c["a"])({},this.searchForm);"ascending"===t.order?e.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):e.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.searchForm=Object(c["a"])({},e),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(c["a"])(Object(c["a"])({},a),t):this.searchForm&&(a=Object(c["a"])(Object(c["a"])({},a),this.searchForm)),this.getDataBefore&&this.getDataBefore(a),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](a).then((function(t){return 1===e.currentPage&&(e.pageSize=t.page_size||1),e.totalRecords=t.total?Number(t.total):0,e.tableData=t.list||[],e.listLoading=!1,e.getMoreData&&e.getMoreData(t,a),t})).catch((function(t){e.listLoading=!1}))}}}}},"9d49":function(t,e,a){"use strict";a.r(e),e["default"]={data:function(){return{bigImgSrc:"",bigImgShow:!1}},created:function(){},methods:{openbigImg:function(t){this.bigImgSrc=t,this.bigImgShow=!0},closebigImg:function(t){this.bigImgShow=!1}}}}}]);

+ 0 - 0
dist/static/js/chunk-e0de387c.f9233bc7.js → dist/static/js/chunk-e0de387c.d5c7cb02.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-libs.7730e0c3.js


+ 27 - 0
src/api/user.js

@@ -124,4 +124,31 @@ export default {
   admestatelottery2pushres: params => { // 推送消息 摇号结果更新
     return getRequestNoSort('/adm/estate/lottery2/push/res', params, 'loading')
   },
+  admcustomerlist: params => { // 客户 - 列表
+    return getRequest('/adm/customer/list', params)
+  },
+  admcustomeredit: params => { // 客户 - 编辑
+    return getRequestNoSort('/adm/customer/edit', params, 'loading')
+  },
+  admcustomeradd: params => { // 客户 - 添加
+    return getRequestNoSort('/adm/customer/add', params, 'loading')
+  },
+  admcustomerdetail: params => { // 客户 - 详情
+    return getRequestNoSort('/adm/customer/detail', params, 'loading')
+  },
+  admcustomerdel: params => { // 客户 - 删除
+    return getRequestNoSort('/adm/customer/del', params, 'loading')
+  },
+  admcustomerrecordlist: params => { // 客户 - 跟进记录 - 列表
+    return getRequest('/adm/customer/record/list', params)
+  },
+  admcustomerrecordedit: params => { // 客户 - 跟进记录 - 编辑
+    return getRequestNoSort('/adm/customer/record/edit', params, 'loading')
+  },
+  admcustomerrecordadd: params => { // 客户 - 跟进记录 - 添加
+    return getRequestNoSort('/adm/customer/record/add', params, 'loading')
+  },
+  admcustomerrecorddel: params => { // 客户 - 跟进记录 - 删除
+    return getRequestNoSort('/adm/customer/record/del', params, 'loading')
+  },
 }

+ 18 - 3
src/components/Common/BaseForm.vue

@@ -618,12 +618,27 @@ export default {
         if (curFormItem) {
           if (curFormItem.changeHandle) {
             if (curFormItem.type === 'selectRemote' && curFormItem.remoteOptions) {
-              let curOption = {}
+              let curOption = curFormItem.multiple ? [] : {}
               curFormItem.remoteOptions.forEach(item => {
-                if (item.valRO === val) {
-                  curOption = item
+                if (curFormItem.multiple) {
+                  const subArr = String(val).split(',') || []
+                  subArr.forEach(sub => {
+                    if (String(item.valRO) === sub) {
+                      curOption.push(item)
+                    }
+                  })
+                } else {
+                  if (item.valRO === val) {
+                    curOption = item
+                  }
                 }
               })
+              // let curOption = {}
+              // curFormItem.remoteOptions.forEach(item => {
+              //   if (item.valRO === val) {
+              //     curOption = item
+              //   }
+              // })
               curFormItem.changeHandle(val, curFormItem, curOption)
             } else if (curFormItem.type === 'select' && curFormItem.options) {
               let curOption = curFormItem.multiple ? [] : {}

+ 121 - 0
src/views/cust/components/popup/IndexEdit.vue

@@ -0,0 +1,121 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑客户' : '新增客户'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      curEstateList: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    estateChange (val, op, arr) {
+      this.curEstateList = arr
+    },
+    getDef() {
+      let params = {...this.curObj}
+      let eNameArr = params.estate_name ? params.estate_name.split(',') : []
+      const eIdArr = params.estate_id ? params.estate_id.split(',') : []
+      let newIds = []
+      eIdArr.map(item => {
+        newIds.push(Number(item))
+      })
+      params.estate_id = newIds
+      let remoteEstateOptions = []
+      newIds.forEach((item, i) => {
+        remoteEstateOptions.push({ keyRO: eNameArr[i], valRO: item })
+      })
+      this.formData = [
+        { label: '姓名', key: 'name', class: 'c-2', rules: 1 },
+        { label: '电话', key: 'phone', class: 'c-2', rules: 1 },
+        { label: '意向等级', key: 'purpose_level', rules: 1, type: 'select', options: this.$dictData.purpose_level },
+        { label: '客户信息', label2: '首付-月供-职业-收入-家庭情况-年龄-名下房源等', key: 'user_info', type: 'textarea' },
+        { label: '购房需求', label2: '学区-改善-刚需-地铁-看江-养老等', key: 'demand', type: 'textarea' },
+        { label: '意向楼盘', key: 'estate_id', type: 'selectRemote', multiple: true, changeHandle: this.estateChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: remoteEstateOptions,
+        },
+        { label: '后续备注', label2: '客户后续相关备注,是否购买?佣金,或者其它', key: 'purchased', type: 'textarea' },
+      ]
+      this.setDefaultValue(params)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+            }
+            let apiStr = 'admcustomeradd'
+            if (newForm.id) apiStr = 'admcustomeredit'
+            let estateNameArr = this.curEstateList.map(item => {
+              return item.estate_name
+            })
+            if (estateNameArr.length > 0) {
+              newForm.estate_name = estateNameArr.join(',')
+            }
+            newForm.estate_id = newForm.estate_id.join(',')
+            this.$api.user[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+</style>

+ 121 - 0
src/views/cust/components/popup/IndexRecord.vue

@@ -0,0 +1,121 @@
+<template>
+  <div>
+    <el-dialog
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="`${curObj.name}的跟进记录`"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <table-list
+        :list-loading="listLoading"
+        :data="tableData"
+        :columns="listConfig"
+        :current-page="currentPage"
+        :page-size="pageSize"
+        :total-records="totalRecords"
+        @currentChange="pageHandle"
+        :isAdd="true"
+        @add="openPopup"
+      />
+      <div class="xl-form">
+        <div class="xl-form-footer">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <record-edit
+      :isShow="isDtlShow"
+      :pObj="curObj"
+      :curObj="subObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import RecordEdit from './RecordEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  components: { RecordEdit },
+  mixins: [...mixins, baseTable],
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      apiStr: 'user.admcustomerrecordlist',
+      noCreated: true,
+      searchForm: {},
+      aList: [],
+      subObj: {},
+      isDtlShow: false,
+    }
+  },
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '楼盘名称', prop: 'estate_name' },
+        { label: '保护期', prop: 'protect_at' },
+        { label: '其它', prop: 'remark', fullShow: true, minWidth: 200, align: 'left' },
+        { label: '创建时间', prop: 'create_at' },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.searchForm = {customer_id: this.curObj.id, page_size: 5}
+        this.fetchData()
+      }
+    },
+  },
+  methods: {
+    // getMoreData (res) {
+    //   const data = res.answer_list || {}
+    //   this.aList = data.list || []
+    //   if (this.currentPage === 1) this.pageSize = data.page_size || 1
+    //   this.totalRecords = data.total ? Number(data.total) : 0
+    // },
+    delHandle(row) {
+      this.$msg(`您确定要删除该跟进记录吗?`, 'confirm', () => {
+        this.$api.user.admcustomerrecorddel({
+          id: row.id
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    close(str) {
+      this.$emit('close')
+    },
+    openPopup(row) {
+      if (row && row.id) {
+        this.subObj = row
+      } else {
+        this.subObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      this.isDtlShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 96 - 0
src/views/cust/components/popup/LineupEdit.vue

@@ -0,0 +1,96 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑排班轮值人员' : '新增排班轮值人员'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      let disabled = false
+      if (this.curObj.id) disabled = true
+      this.formData = [
+        { label: '标签', key: 'question_tag', rules: 1, type: 'select', options: this.$dictData.question_tag },
+        { label: '问题', key: 'question_cont', type: 'textarea', rules: 1 },
+        { label: '答案', key: 'answer_cont', type: 'textarea', rules: 1 },
+      ]
+      this.setDefaultValue(this.curObj)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+            }
+            let apiStr = 'admqaadd'
+            // newForm.question_tag = newForm.question_tag.join(',')
+            if (newForm.id) apiStr = 'admqaedit'
+            this.$api.other[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+</style>

+ 92 - 0
src/views/cust/components/popup/RecordEdit.vue

@@ -0,0 +1,92 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑跟进记录' : '新增跟进记录'"
+      :fullscreen="false"
+      width="500px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object,
+    pObj: Object,
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      curEstateObj: {},
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        console.log(this.pObj)
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      this.formData = [
+        { label: '带看楼盘', key: 'estate_id', type: 'selectRemote', changeHandle: this.estateChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+        },
+        { label: '保护期', key: 'protect_at', type: 'datePicker', type2: 'date', rules: 1 },
+        { label: '其它信息', label2: '相关接待置业顾问、房源', key: 'remark', type: 'textarea' },
+      ]
+      this.setDefaultValue(this.curObj)
+    },
+    estateChange (val, op, item) {
+      this.curEstateObj = item
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+            }
+            newForm.customer_id = this.pObj.id
+            newForm.estate_name = this.curEstateObj.estate_name
+            let apiStr = 'admcustomerrecordadd'
+            if (newForm.id) apiStr = 'admcustomerrecordedit'
+            this.$api.user[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 43 - 0
src/views/cust/components/searchForm/Index.vue

@@ -0,0 +1,43 @@
+<template>
+  <base-form slot="content" ref="ruleForm" :data="searchData">
+    <div slot="footer">
+      <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
+      <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
+    </div>
+  </base-form>
+</template>
+<script>
+export default {
+  name: 'custIndex',
+  mixins: [],
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      searchData: [
+        { label: '电话', key: 'phone' },
+        { label: '姓名', key: 'name' },
+        { label: '意向等级', key: 'purpose_level', type: 'select', options: this.$dictData.purpose_level},
+        { label: '意向楼盘', key: 'estate_id', type: 'selectRemote',
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+        },
+        { label: '购房需求', key: 'demand' },
+        { label: '客户信息', key: 'user_info' },
+      ]
+    }
+  },
+  methods: {
+    addHandle () {
+      this.parentData.isDtlShow = true
+      this.parentData.curObj = {}
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 35 - 0
src/views/cust/components/searchForm/Lineup.vue

@@ -0,0 +1,35 @@
+<template>
+  <base-form slot="content" ref="ruleForm" :data="searchData">
+    <div slot="footer">
+      <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
+      <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
+    </div>
+  </base-form>
+</template>
+<script>
+export default {
+  mixins: [],
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      searchData: [
+        { label: '姓名', key: 'name' },
+      ]
+    }
+  },
+  methods: {
+    addHandle () {
+      this.parentData.isDtlShow = true
+      this.parentData.curObj = {}
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 134 - 0
src/views/cust/index.vue

@@ -0,0 +1,134 @@
+<template>
+  <div class="app-container">
+    <search-form
+      :list-loading="listLoading"
+      @change="searchHandle"
+    />
+    <table-list
+      :list-loading="listLoading"
+      :data="tableData2"
+      :columns="listConfig"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total-records="totalRecords"
+      @currentChange="pageHandle"
+      :isAdd="true"
+      @add="openPopup"
+      :operationsDefaultLength="6"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+    <index-record
+      :isShow="isQShow"
+      :curObj="curObj"
+      @close="closeQPopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Index'
+import IndexRecord from './components/popup/IndexRecord'
+import PopupEdit from './components/popup/IndexEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+    IndexRecord,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'user.admcustomerlist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      isQShow: false,
+      isAShow: false,
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        item.newRecord = `${item.record_estate_name ? item.record_estate_name : '未选楼盘'}${item.record_protect_at ? '(' + item.record_protect_at + ')' : ''}-${item.record_remark ? item.record_remark : ''}`
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '电话', prop: 'phone' },
+        { label: '姓名', prop: 'name' },
+        { label: '最新跟进记录', prop: 'newRecord', fullShow: true, minWidth: 150, align: 'left' },
+        { label: '意向等级', prop: 'purpose_level', type: 'flag', flags: arrToObj(this.$dictData.purpose_level	) },
+        { label: '客户信息', prop: 'user_info', fullShow: true, minWidth: 150, align: 'left' },
+        { label: '购房需求', prop: 'demand', fullShow: true, minWidth: 150, align: 'left' },
+        { label: '意向楼盘', prop: 'estate_name', fullShow: true},
+        { label: '后续备注', prop: 'purchased', fullShow: true },
+        { label: '创建时间', prop: 'create_at' },
+        { label: '创建人', prop: 'create_by' },
+        { label: '操作', width: 200, type: 'handle2', operations:
+          [
+            { label: '跟进记录', func: this.openQPopup, btnType: 'success' },
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    openQPopup (row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isQShow = true
+    },
+    closeQPopup (obj) {
+      this.isQShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该客户吗?`, 'confirm', () => {
+        this.$api.user.admcustomerdel({
+          id: row.id
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    openPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      this.isDtlShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    }
+  }
+}
+</script>

+ 102 - 0
src/views/cust/lineup.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="app-container">
+    <search-form
+      :list-loading="listLoading"
+      @change="searchHandle"
+    />
+    <table-list
+      :list-loading="listLoading"
+      :data="tableData2"
+      :columns="listConfig"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total-records="totalRecords"
+      @currentChange="pageHandle"
+      :isAdd="true"
+      @add="openPopup"
+      :operationsDefaultLength="6"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Lineup'
+import PopupEdit from './components/popup/LineupEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'other.admqalist2',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '标签', prop: 'question_tag', type: 'flag', flags: arrToObj(this.$dictData.question_tag), width: 120 },
+        { label: '问题', prop: 'question_cont', fullShow: true, minWidth: 200, align: 'left' },
+        { label: '答案', prop: 'answer_cont', fullShow: true, minWidth: 200, align: 'left' },
+        { label: '创建时间', prop: 'create_at' },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    delHandle(row) {
+      this.$msg(`您确定要删除该问题吗?`, 'confirm', () => {
+        this.$api.other.admqadel({
+          id: row.id
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    openPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      this.isDtlShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    }
+  }
+}
+</script>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels