liujq преди 2 години
родител
ревизия
0d4ae3f053

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/index.html


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/css/chunk-653062da.4a26b9c5.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/app.01353a42.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/app.0f2451da.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/chunk-653062da.d8ba226e.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/chunk-7aedfd1c.807725a2.js


+ 9 - 0
src/api/house.js

@@ -67,5 +67,14 @@ export default {
   admbrokeragedel: params => { // 内部楼盘 平台渠道 - 删除
     return getRequestNoSort('/adm/brokerage/del', params, 'loading')
   },
+  admestatecustoslist: params => { // 外部楼盘 - 小程序客服 - 列表
+    return getRequest('adm/estate/custos/list', params)
+  },
+  admestatecustosadd: params => { // 外部楼盘 - 小程序客服 - 添加
+    return getRequestNoSort('/adm/estate/custos/add', params, 'loading')
+  },
+  admestatecustosdel: params => { // 外部楼盘 - 小程序客服 - 删除
+    return getRequestNoSort('/adm/estate/custos/del', params, 'loading')
+  },
 }
 

+ 8 - 85
src/views/house/components/popup/SaleEdit.vue

@@ -5,13 +5,13 @@
       :show-close="false"
       :close-on-click-modal="false"
       :visible.sync="isShow"
-      :title="curObj.id ? '编辑楼盘置业顾问' : '新增楼盘置业顾问'"
+      :title="curObj.id ? '编辑小程序客服' : '新增小程序客服'"
       :fullscreen="false"
-      width="700px"
+      width="400px"
       custom-class="xl-dialog"
       center
     >
-      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+      <base-form ref="ruleForm" :data="formData" :is-inline="false" label-width="80px">
       </base-form>
       <div class="xl-form">
         <div class="xl-form-footer">
@@ -33,15 +33,9 @@ export default {
   },
   inject: ['parentData'],
   data() {
-    const token = window.sessionStorage.getItem('fp_token')
-    let domainUrl = process.env.VUE_APP_BASE_API
     return {
-      domainUrl,
-      token,
       loading: false,
       formData: [],
-      cObj: {},
-      imagesArr: [],
     }
   },
   watch: {
@@ -53,12 +47,10 @@ export default {
   },
   methods: {
     getDef (str) {
-      let params = {}
-      params = { ...this.curObj }
+      let params = { ...this.curObj }
       this.formData = [
-        { label: '销售列表', key: 'sale_id', type: 'selectRemote',
-          remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist`, opKey: 'sale_name', opVal: 'id' },
-          remoteOptions: [{ keyRO: params.sale_name, valRO: params.sale_id }]
+        { label: '选择用户', key: 'user_id', type: 'selectRemote',
+          remoteParams: { skey: 'nickname', api: `user.admuserlist?auth_state=1`, opKey: 'nickname', opVal: 'id' },
         },
       ]
       this.setDefaultValue(params)
@@ -71,18 +63,15 @@ export default {
             const newForm = { ...oldform }
             if (this.curObj.id) newForm.id = this.curObj.id
             newForm.estate_id = this.parentData.searchForm.estate_id
-            let apiStr = 'admestatesaleadd'
-            if (this.curObj.id) apiStr = 'admestatesaleedit'
+            let apiStr = 'admestatecustosadd'
             this.$api.house[apiStr](newForm).then(data => {
-              this.$msgs(newForm.estate_id ? '编辑成功' : '新增成功')
-              this.productData = []
+              this.$msgs('新增成功')
               this.$emit('close', newForm)
             })
           }
         })
       } else {
         this.$emit('close')
-        this.productData = []
         this.setDefaultValue()
       }
     },
@@ -90,70 +79,4 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-@import '../../../../styles/libEdit.scss';
-.lib-edit {
-  padding-top: 0;
-  ::v-deep .el-date-editor.el-input {
-    width: 100%;
-  }
-  ::v-deep .el-textarea__inner {
-    height: 300px;
-  }
-}
-
-.scoped-img-area {
-  padding-left: 40px;
-  .sia-op {
-    display: inline-block;
-    vertical-align: middle;
-    margin-right: 10px;
-    margin-bottom: 10px;
-    border: 1px solid #f2f2f2;
-    width: 80px;
-    height: 80px;
-    position: relative;
-    &:hover {
-      .img-big {
-        display: block;
-      }
-    }
-    .img {
-      width: 80px;
-      height: 80px;
-    }
-    .close {
-      position: absolute;
-      width: 20px;
-      height: 20px;
-      top: -10px;
-      right: -10px;
-      background: url(../../../../assets/icon_g_close.png) no-repeat;
-      background-size: 20px;
-      cursor: pointer;
-    }
-    .img-big {
-      position: absolute;
-      bottom: 0;
-      left: 0;
-      width: 400px;
-      height: auto;
-      display: none;
-      box-shadow: 10px 10px 10px #ccc;
-      z-index: 99;
-    }
-  }
-  .sia-img {
-    display: inline-block;
-    vertical-align: middle;
-    width: 80px;
-    height: 80px;
-    overflow: hidden;
-    border: 1px dashed #999;
-    margin-bottom: 10px;
-    .el-icon-plus {
-      color: #999;
-      padding: 30px;
-    }
-  }
-}
 </style>

+ 63 - 0
src/views/house/components/searchForm/Sale.vue

@@ -0,0 +1,63 @@
+<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">查询:{{name}}</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 {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  mixins,
+  data() {
+    return {
+      searchData: [],
+      isHidePut: false,
+    }
+  },
+  computed: {
+    name () {
+      return this.parentData.$route.query.name || ''
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    addHandle () {
+      this.parentData.isDtlShow = true
+      this.parentData.curObj = {}
+    },
+    getDef (str) {
+      let params = { ...this.$refs.ruleForm.baseForm }
+      const query = this.$route.query
+      let estateName = query.name || ''
+      params.estate_id = query.id ? Number(query.id) : ''
+      this.searchData = [
+        { label: '选择楼盘', key: 'estate_id', type: 'selectRemote', changeHandle: this.estateChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: [{ keyRO: estateName, valRO: params.estate_id }]
+        },
+        { label: '选择用户', key: 'user_id', type: 'selectRemote',
+          remoteParams: { skey: 'nickname', api: `user.admuserlist?auth_state=1`, opKey: 'nickname', opVal: 'id' },
+        },
+      ]
+      this.setDefaultValue(params, 'searchData')
+    },
+    estateChange (val, options, curItem) {
+      this.$router.push(`/house/sale?id=${val}&name=${curItem.estate_name}`)
+      // this.$router.go(0)
+      this.searchHandle()
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 4 - 0
src/views/house/index.vue

@@ -86,6 +86,7 @@ export default {
             { label: '楼盘介绍', func: this.linkDesc, btnType: 'success' },
             { label: '一页纸', func: this.openHRPopup, btnType: 'success' },
             { label: '案场人员', func: this.linkGovern, btnType: 'info' },
+            { label: '小程序客服', func: this.linkKefu, btnType: 'info' },
           ]
         }
       ]
@@ -95,6 +96,9 @@ export default {
     linkDesc (row) {
       this.$router.push(`/house/contentEdit?id=${row.id}`)
     },
+    linkKefu (row) {
+      this.$router.push(`/house/sale?id=${row.id}&name=${row.estate_name}`)
+    },
     linkGovern (row) {
       this.$router.push(`/house/govern?id=${row.id}&name=${row.estate_name}`)
     },

+ 15 - 14
src/views/house/sale.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-container">
-    <!-- <search-form
+    <search-form
       :list-loading="listLoading"
       @change="searchHandle"
-    /> -->
+    />
     <table-list
       :list-loading="listLoading"
       :data="tableData2"
@@ -23,13 +23,14 @@
     />
   </div>
 </template>
+
 <script>
 import { arrToObj } from '@/utils'
-import SearchForm from './components/searchForm/News'
+import SearchForm from './components/searchForm/Sale'
 import PopupEdit from './components/popup/SaleEdit'
 import baseTable from '_m/baseTable.js'
 export default {
-  name: 'HouseNews',
+  name: 'sale',
   components: {
     SearchForm,
     PopupEdit,
@@ -42,7 +43,7 @@ export default {
   mixins: [baseTable],
   data() {
     return {
-      apiStr: 'house.admestatesalelist',
+      apiStr: 'house.admestatecustoslist',
       searchForm: {},
       isDtlShow: false,
       // noCreated: true,
@@ -52,7 +53,8 @@ export default {
   computed: {
     tableData2() {
       const arr = [...this.tableData]
-      arr.map(item => {})
+      arr.map(item => {
+      })
       return arr
     }
   },
@@ -63,14 +65,13 @@ export default {
   mounted() {
     this.listConfig = {
       rows: [
-        { label: '分类', prop: 'sale_type', type: 'flag', flags: arrToObj(this.$dictData.sale_type	) },
-        { label: '置业经理', prop: 'sale_name' },
-        { label: '头像', prop: 'sale_avatar', type: 'img' },
-        { label: '联系电话', prop: 'sale_phone' },
-        { label: '销售标签', prop: 'custom_tag'},
+        { label: '姓名', prop: 'nickname'},
+        { label: '手机号', prop: 'phone'},
+        { label: '更新人', prop: 'update_by' },
+        { label: '更新时间', prop: 'update_at' },
         { label: '操作', width: 120, type: 'handle2', operations:
           [
-            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            // { label: '编辑', func: this.openPopup, btnType: 'primary' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
@@ -79,8 +80,8 @@ export default {
   },
   methods: {
     delHandle(row) {
-      this.$msg(`您确定要删除该置业顾问吗?`, 'confirm', () => {
-        this.$api.house.admestatesaledel({
+      this.$msg(`您确定要删除该客服吗?`, 'confirm', () => {
+        this.$api.house.admestatecustosdel({
           id: row.id,
         }).then(data => {
           this.$msgs(`已删除!`)

Някои файлове не бяха показани, защото твърде много файлове са промени