liujq hace 3 años
padre
commit
43c27cea0f

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/index.html


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/chunk-4946ebaf.fb1f6344.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/chunk-72d95988.85dc112f.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/app.4c2c1557.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/app.5f13b5ae.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/chunk-4946ebaf.49569887.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/chunk-72d95988.ead43d0b.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/chunk-7441b538.2f11f97e.js


+ 15 - 0
src/api/house.js

@@ -205,4 +205,19 @@ export default {
   admestatebargaindetail: params => { // 特价楼盘 - 详情
     return getRequestNoSort('/adm/estate/bargain/detail', params, 'loading')
   },
+  admestatecooperatelist: params => { // 合作楼盘 - 列表
+    return getRequest('/adm/estate/cooperate/list', params)
+  },
+  admestatecooperateedit: params => { // 合作楼盘 - 编辑
+    return getRequestNoSort('/adm/estate/cooperate/edit', params, 'loading')
+  },
+  admestatecooperateadd: params => { // 合作楼盘 - 添加
+    return getRequestNoSort('/adm/estate/cooperate/add', params, 'loading')
+  },
+  admestatecooperatedetail: params => { // 合作楼盘 - 详情
+    return getRequestNoSort('/adm/estate/cooperate/detail', params, 'loading')
+  },
+  admestatecooperatedel: params => { // 合作楼盘 - 删除
+    return getRequestNoSort('/adm/estate/cooperate/del', params, 'loading')
+  },
 }

+ 3 - 0
src/api/user.js

@@ -94,6 +94,9 @@ export default {
   admwechatusersale: params => { //  用户 -  用户角色设置 - 置业经理 普通用户
     return getRequestNoSort('/adm/wechat/user/sale', params, 'loading')
   },
+  admwechatuserpartner: params => { //  用户 -  用户角色设置 - 渠道合伙人 普通用户
+    return getRequestNoSort('/adm/wechat/user/partner', params, 'loading')
+  },
   admsaleuserlist: params => { // 销售列表 置业经理
     return getRequest('/adm/sale/user/list', params)
   },

+ 120 - 0
src/views/house/components/popup/CooperateEdit.vue

@@ -0,0 +1,120 @@
+<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="100px">
+        <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: {},
+      posTips: '',
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (val) {
+          if (this.curObj.id) {
+            this.$api.house.admestatecooperatedetail({id: this.curObj.id}).then(res => {
+              let curData = res || {}
+              curData.startEndTime = [curData.start_at, curData.end_at]
+              this.cObj = curData || {}
+              this.getDef()
+            })
+          } else {
+            this.cObj = this.curObj
+            this.getDef()
+          }
+        }
+      }
+    },
+  },
+  methods: {
+    getDef(fieldStr) {
+      let params = { ...this.cObj }
+      this.formData = [
+        { label: '关联楼盘', rules: 1, key: 'estate_id', class: 'c-2', type: 'selectRemote',
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: [{ keyRO: params.estate_name, valRO: params.estate_id }]
+        },
+        { label: '排序', key: 'sort', class: 'c-2' },
+        { label: '备注', key: 'remark', type: 'textarea', rules: 1},
+        { label: '特价时间', label2: '开始时间', label3: '结束时间', key: 'startEndTime', type: 'datePicker', rules: 1},
+      ]
+      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 = 'admestatecooperateadd'
+            if (newForm.id) apiStr = 'admestatecooperateedit'
+            newForm.start_at = newForm.startEndTime[0]
+            newForm.end_at = newForm.startEndTime[1]
+            delete newForm.startEndTime
+            this.$api.house[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%;
+  }
+}
+::v-deep .img-upload {
+  height: 180px;
+  overflow: hidden;
+  .icon {
+    width: 160px;
+  }
+  .img {
+    width: 160px;
+  }
+}
+</style>

+ 33 - 0
src/views/house/components/searchForm/Cooperate.vue

@@ -0,0 +1,33 @@
+<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-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
+    </div>
+  </base-form>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      searchData: [
+        { label: '楼盘名称', key: 'estate_id', type: 'selectRemote', changeHandle: this.ltValHandle,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+        },
+        { label: '备注', key: 'remark' },
+      ]
+    }
+  },
+  methods: {
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 104 - 0
src/views/house/cooperate.vue

@@ -0,0 +1,104 @@
+<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"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Cooperate'
+import PopupEdit from './components/popup/CooperateEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'house.admestatecooperatelist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData,]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '排序', prop: 'sort'},
+        { label: '开始时间', prop: 'start_at' },
+        { label: '结束时间', prop: 'end_at' },
+        { label: '楼盘名称', prop: 'estate_name' }, 
+        { label: '备注', prop: 'remark' },
+        { label: '更新人', prop: 'update_by' },
+        { label: '更新时间', prop: 'update_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.house.admestatecooperatedel({
+          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>

+ 30 - 4
src/views/user/app.vue

@@ -80,7 +80,8 @@ export default {
         { label: '手机号', prop: 'phones' },
         { label: '注册时间', prop: 'create_at' },
         { label: '禁言状态', prop: 'is_gag', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'success', '1': 'danger'} },
-        { label: '置业经理', prop: 'is_sale', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
+        { label: '销售', prop: 'is_sale', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
+        { label: '渠道', prop: 'is_partner', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'2': 'info', '1': 'primary'} },
         { label: '备注', prop: 'tag', type: 'input', width: 100},
         { label: '操作', width: 260, type: 'handle2', operations:
           [
@@ -102,11 +103,23 @@ export default {
             { labelFor: 'is_sale', func: this.isSaleHandle,
               labelConfig: {
                 texts: {
-                  1: '设成用户',
+                  1: '销售取消',
                   2: '设成销售'
                 },
                 btnTypes: {
-                  1: 'primary',
+                  1: 'danger',
+                  2: 'info'
+                }
+              }
+            },
+            { labelFor: 'is_partner', func: this.isPartnerHandle,
+              labelConfig: {
+                texts: {
+                  1: '渠道取消',
+                  2: '设成渠道'
+                },
+                btnTypes: {
+                  1: 'danger',
                   2: 'info'
                 }
               }
@@ -146,9 +159,22 @@ export default {
         this.fetchData()
       }
     },
+    isPartnerHandle (row) {
+      const is_partner = Number(row.is_partner) === 1 ? 2 : 1
+      const msgText = Number(row.is_partner) === 1 ? '取消渠道合伙人' : '设置成渠道合伙人---'
+      this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
+        this.$api.user.admwechatuserpartner({
+          id: row.id,
+          is_partner
+        }).then(data => {
+          this.$msgs(`${msgText}成功!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
     isSaleHandle (row) {
       const is_sale = Number(row.is_sale) === 1 ? 2 : 1
-      const msgText = Number(row.is_sale) === 1 ? '设置成用户' : '设置成置业经理---'
+      const msgText = Number(row.is_sale) === 1 ? '取消销售' : '设置成销售置业经理---'
       this.$msg(`确定要${msgText}${row.nickname}吗?`, 'confirm', ()=> {
         this.$api.user.admwechatusersale({
           id: row.id,

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio