liujq 2 年之前
父节点
当前提交
f499496979

二进制
dist/favicon.ico


文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.5c3df960.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/chunk-ee0b8224.66763ec6.css


二进制
dist/static/img/logo.8f6d1c8a.png


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.790cca40.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.cd344fda.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-26f037b4.b410d37c.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-ee0b8224.315296e4.js


二进制
public/favicon.ico


+ 19 - 1
src/api/cust.js

@@ -5,7 +5,7 @@ import { getRequest, getRequestNoSort } from '@/utils/request'
 
 export default {
   admreportlist: params => { // 报备 - 客户列表
-    return getRequestNoSort('/adm/report/list', params, 'loading')
+    return getRequestNoSort('/adm/report/list', params)
   },
   admreportdetail: params => { // 报备 - 客户详情
     return getRequestNoSort('/adm/report/detail', params, 'loading')
@@ -16,4 +16,22 @@ export default {
   admreportstepadd: params => { // 报备 - 更改报备进度
     return getRequestNoSort('/adm/report/step/add', params, 'loading')
   },
+  admcustomerlist: params => { // 客户 -  列表
+    return getRequest('/adm/customer/list', params)
+  },
+  admcustomeradd: params => { // 客户 -  添加
+    return getRequestNoSort('/adm/customer/add', params, 'loading')
+  },
+  admcustomeredit: params => { // 客户 -  编辑
+    return getRequestNoSort('/adm/customer/edit', params, 'loading')
+  },
+  admcustomerdetail: params => { // 客户 -  详情
+    return getRequestNoSort('/adm/customer/detail', params, 'loading')
+  },
+  admcustomerdel: params => { // 客户 -  删除
+    return getRequestNoSort('/adm/customer/del', params, 'loading')
+  },
+  admcustomerimport: params => { // 客户 -  删除
+    return getRequestNoSort('/adm/customer/import', params, 'loading')
+  },
 }

二进制
src/assets/logo.png


+ 0 - 0
dist/static/img/logo.d7d9da04.png → src/assets/logo22.png


+ 0 - 1
src/layout/components/Sidebar/Logo.vue

@@ -58,7 +58,6 @@ export default {
       width: 32px;
       height: 32px;
       vertical-align: middle;
-      margin-right: 12px;
     }
 
     & .sidebar-title {

+ 4 - 30
src/views/cust/components/popup/IndexEdit.vue

@@ -45,33 +45,13 @@ export default {
     },
   },
   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' },
+        { label: '性别', key: 'sex', rules: 1, type: 'select', options: this.$dictData.sex },
+        { label: '备注', label2: '备注', key: 'demand', type: 'textarea' },
       ]
       this.setDefaultValue(params)
     },
@@ -86,14 +66,8 @@ export default {
             }
             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 => {
+            newForm.phone_type = 1
+            this.$api.cust[apiStr](newForm).then(data => {
               this.$msgs(newForm.id ? '编辑成功' : '新增成功')
               this.$emit('close', newForm)
             })

+ 86 - 0
src/views/cust/components/searchForm/My.vue

@@ -0,0 +1,86 @@
+<template>
+  <header-collapse>
+    <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>
+        <el-upload
+          style="display: inline-block;margin-left: 10px;"
+          ref="upload"
+          name="excel"
+          :action="`${requireUrl}/adm/customer/import`"
+          :data="{type: 'cust', token}"
+          :show-file-list="false"
+          :on-success="uploadSuccess"
+          :on-error="uploadError"
+          :before-upload="uploadBefore"
+          :multiple="false"
+          :limit="1"
+          :on-exceed="uploadHandleExceed"
+        >
+          <el-button icon="el-icon-upload2" class="xl-form-btn bgc3" >批量导入</el-button>
+        </el-upload>
+        <!-- <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc3" @click="addHandle">批量导入</el-button> -->
+      </div>
+    </base-form>
+  </header-collapse>
+</template>
+<script>
+export default {
+  name: 'custIndex',
+  mixins: [],
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    let requireUrl = process.env.VUE_APP_BASE_API
+    const token = window.sessionStorage.getItem('fp_token')
+    return {
+      requireUrl,
+      uploadHeaders: {
+        'Content-Type': 'multipart/form-data'
+      },
+      token,
+      searchData: [
+        { label: '电话', key: 'phone' },
+        { label: '姓名', key: 'name' },
+        { label: '性别', key: 'sex', type: 'select', options: this.$dictData.sex},
+        { label: '备注', key: 'demand' },
+      ]
+    }
+  },
+  methods: {
+    uploadBefore(file) {
+      console.log('上传前:', file)
+    },
+    uploadHandleExceed(files, fileList) {
+      this.$msgw(`当前限制上传 1 个文件`)
+    },
+    uploadSuccess(res, file) {
+      this.$refs.upload.clearFiles()
+      if(res.errno === 0){
+        this.$msg('导入成功!', '', () => {
+          this.parentData.fetchData()
+        })
+      } else {
+        this.$msgw(res.msg)
+      }
+    },
+    uploadError(file) {
+      this.$refs.upload.clearFiles();
+      this.$msg('上传失败!')
+      console.log('上传失败:', file)
+    },
+    addHandle () {
+      this.parentData.isDtlShow = true
+      this.parentData.curObj = {}
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 108 - 0
src/views/cust/my.vue

@@ -0,0 +1,108 @@
+<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"
+      @sizeChange="sizeChange"
+      :operationsDefaultLength="6"
+      :isAdd="true"
+      @add="openPopup"
+    >
+    </table-list>
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/My'
+import PopupEdit from './components/popup/IndexEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'cust.admcustomerlist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      isQShow: false,
+      isAShow: false,
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '姓名', prop: 'name' },
+        { label: '电话', prop: 'phone' },
+        { label: '性别', prop: 'sex', type: 'tag', tags: arrToObj(this.$dictData.sex), tagTypeObj: {'male': 'primary', 'female': 'danger'} },
+        { label: '备注', prop: 'demand', fullShow: true, minWidth: 200, align: 'left' },
+        { label: '创建人', prop: 'create_by' },
+        { 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.cust.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>

部分文件因为文件数量过多而无法显示