230320a303 1 year ago
parent
commit
6de0023558

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-3a2d7000.1358438e.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7e702058.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.8f49c3eb.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-2485a2f7.f2f6c7f5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3a2d7000.9633a0c0.js


+ 3 - 0
src/api/cust.js

@@ -64,4 +64,7 @@ export default {
   admtraderecorddel: params => { // 成交  更新记录 -  删除
     return getRequestNoSort('/adm/trade/record/del', params, 'loading')
   },
+  admtradestateedit: params => { // 成交  有效无效更新状态
+    return getRequestNoSort('/adm/trade/state/edit', params, 'loading')
+  },
 }

+ 56 - 6
src/views/shop/map.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="app-container">
+    <div class="scoped-select">
+      <div :class="`${curStoreBrand === item.val ? 'cur' : ''} ss-op`" v-for="(item, index) in sbArr" @click="brandHandle(item)" :key="index">{{ item.key }}</div>
+    </div>
     <el-amap
       class="amap-box"
       :vid="'amap-vue'"
@@ -9,7 +12,6 @@
       :mapStyle="mapDiyObj.mapStyle"
       :center="mapDiyObj.center"
       :events="mapEvents"
-      :plugin="plugin"
     >
       <el-amap-marker class="scoped-m-box" v-for="(marker, index) in markerList" :key="3000 + index"
           icon="https://img2.honglounews.com/20220110041435-6276.png"
@@ -17,10 +19,17 @@
           height="20"
           :position="marker.position"
           :title="marker.store_name"
-          :label="{content: `${marker.signing == 1 ? 'Y' : 'N'}${marker.store_name}[${marker.clerk_num}]`, offset: [-10 * marker.store_name.length / 2, -20]}"
+          :label="{ content: `${marker.signing == 1 ? 'Y' : 'N'}${marker.store_name}[${marker.clerk_num}]`, offset: [-10 * marker.store_name.length / 2, -20]}"
           :extData="{id: marker.id}"
-        >
+          >
+          <!-- :content='`
+            <div class="scoped-m-box" style="background: ${storeBrandObj[marker.store_brand]};">
+              ${marker.signing}${marker.store_name}[${marker.clerk_num}]
+            </div>
+          `' -->
+          <!-- :label="{ content: `${marker.signing == 1 ? 'Y' : 'N'}${marker.store_name}[${marker.clerk_num}]`, offset: [-10 * marker.store_name.length / 2, -20]}" -->
         </el-amap-marker>
+        
     </el-amap>
   </div>
 </template>
@@ -35,11 +44,13 @@ export default {
   data() {
     const that = this
     return {
+      storeBrandObj: {},
       markerList: [],
+      curStoreBrand: '',
       mapDiyObj: {
-        center: [115.852386, 28.684076],
+        center: [115.852386, 28.624076],
         zoom: 13,
-        zooms: [11, 21],
+        zooms: [11, 23],
       },
       amapManager,
       mapEvents: {
@@ -97,13 +108,26 @@ export default {
   },
   computed: {},
   created() {
+    let sbArr = this.$dictData.store_brand || []
+    let storeBrandObj = {}
+    sbArr.forEach(item => {
+      storeBrandObj[item.val] = item.option1 || '#673ab7'
+    })
+    this.sbArr = [{key: '全部', val: ''},...sbArr]
+    this.storeBrandObj = {...storeBrandObj}
     this.getData()
   },
   mounted() {},
   methods: {
+    brandHandle (item) {
+      this.curStoreBrand = item.val
+      this.getData()
+    },
     getData () {
       this.$api.shop.admstorelist({
-        page_size: 10000
+        page_size: 10000,
+        page: 1,
+        store_brand: this.curStoreBrand
       }).then(res => {
         const list = res.list || []
         let markerList = list.map(item => {
@@ -113,6 +137,7 @@ export default {
             store_name: item.store_name,
             clerk_num: item.clerk_num,
             signing: item.signing,
+            store_brand: item.store_brand
           }
         })
         this.markerList = [...markerList]
@@ -159,6 +184,31 @@ export default {
 
 
 
+::v-deep .scoped-m-box {
+  color: #fff;
+  padding: 0;
+  border-radius: 6px;
+  font-size: 12px;
+}
 
 
+.scoped-select {
+  padding-top: 10px;
+  padding-left: 10px;
+  .ss-op {
+    color: #666;
+    background: #ccc;
+    border-radius: 6px;
+    padding: 3px 10px;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    display: inline-block;
+    cursor: pointer;
+    user-select: none;
+    &.cur {
+      color: #fff;
+      background: #2d8cf0;
+    }
+  }
+}
 </style>

+ 0 - 3
src/views/trade/components/popup/RecordEdit.vue

@@ -66,9 +66,6 @@ export default {
             const oldform = this.$refs.ruleForm.baseForm
             const newForm = { ...oldform }
             let apiStr = 'admtraderecordadd'
-            if (this.pObj.id) {
-              newForm.trade_id = this.pObj.id
-            }
             this.$api.cust[apiStr](newForm).then(data => {
               this.$msgs(newForm.id ? '编辑成功' : '新增成功')
               this.$emit('close', newForm)

+ 115 - 0
src/views/trade/components/popup/StateEdit.vue

@@ -0,0 +1,115 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑成交状态' : '更新成交状态'"
+      :fullscreen="false"
+      width="330px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="50px">
+        <div slot="otherItem" class="scoped-select">
+          <div :class="`${curDes === item.key ? 'cur' : ''} ss-op`" v-for="(item, index) in tsdArr" @click="desHandle(item)" :key="index">{{ item.key }}</div>
+        </div>
+        <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>
+import { arrToObj } from '@/utils'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object,
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      curEstateObj: {},
+      curDes: '',
+    }
+  },
+  computed: {
+    tsdArr () {
+      return this.$dictData.trade_state_des || []
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    desHandle (item) {
+      this.curDes = item.key
+      this.getDef('trade_state_des', item.key)
+    },
+    getDef(str, key) {
+      let params = { ...this.curObj }
+      if (str === 'trade_state_des') {
+        params.trade_state_des = key
+      }
+      this.formData = [
+        { label: '状态', key: 'trade_state', type: 'select', options: this.$dictData.trade_state },
+        { label: '备注', key: 'trade_state_des', 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 }
+            let apiStr = 'admtradestateedit'
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+            }
+            newForm.record_des = `维护成:${arrToObj(this.$dictData.trade_state)[newForm.trade_state]},原因:${newForm.trade_state_des}`
+            this.$api.cust[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.scoped-select {
+  .ss-op {
+    color: #666;
+    background: #ccc;
+    border-radius: 6px;
+    padding: 3px 10px;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    display: inline-block;
+    cursor: pointer;
+    &.cur {
+      color: #fff;
+      background: #2d8cf0;
+    }
+  }
+}
+</style>

+ 2 - 1
src/views/trade/components/searchForm/Index.vue

@@ -23,6 +23,7 @@ export default {
         { label: '成交楼盘', key: 'deal_item' },
         { label: '成交类型', key: 'deal_type', type: 'select', options: this.$dictData.trade_deal_type},
         { label: '审核状态', key: 'check_state', type: 'select', options: this.$dictData.check_state},
+        { label: '成交单状态', key: 'trade_state', type: 'select', options: this.$dictData.trade_state},
         { label: '时间', label2: '开始成交日期', label3: '结束成交日期', key: 'startEndTime', type: 'datePicker'},
         { label: '客户姓名', key: 'customer_name' },
         { label: '客户电话', key: 'customer_phone' },
@@ -57,7 +58,7 @@ export default {
         return
       }
       const token = window.sessionStorage.getItem('fp_token')
-      window.open(`https://api.fangpiaovip.com/adm/trade/export?token=${encodeURIComponent(token)}&start_at=${newForm.start_at}&end_at=${newForm.end_at}&house_type=${newForm.house_type}&deal_clerk=${newForm.deal_clerk}&deal_item=${newForm.deal_item}&deal_type=${newForm.deal_type}`)
+      window.open(`https://api.fangpiaovip.com/adm/trade/export?token=${encodeURIComponent(token)}&start_at=${newForm.start_at}&end_at=${newForm.end_at}&house_type=${newForm.house_type}&deal_clerk=${newForm.deal_clerk}&deal_item=${newForm.deal_item}&deal_type=${newForm.deal_type}&trade_state=${newForm.trade_state}`)
     }
   }
 }

+ 32 - 2
src/views/trade/index.vue

@@ -28,6 +28,16 @@
       :curObj="curObj"
       @close="closeQPopup"
     />
+    <index-record
+      :isShow="isQShow"
+      :curObj="curObj"
+      @close="closeQPopup"
+    />
+    <state-edit
+      :isShow="isStateShow"
+      :curObj="curObj"
+      @close="closeStatePopup"
+    />
   </div>
 </template>
 <script>
@@ -35,12 +45,14 @@ import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import IndexRecord from './components/popup/IndexRecord'
 import PopupEdit from './components/popup/IndexEdit'
+import StateEdit from './components/popup/StateEdit'
 import baseTable from '_m/baseTable.js'
 export default {
   name: 'index',
   components: {
     SearchForm,
     PopupEdit,
+    StateEdit,
     IndexRecord,
   },
   provide() {
@@ -57,6 +69,7 @@ export default {
       curObj: {},
       isQShow: false,
       isAShow: false,
+      isStateShow: false,
     }
   },
   computed: {
@@ -73,6 +86,8 @@ export default {
   mounted() {
     this.listConfig = {
       rows: [
+        { label: '状态', prop: 'trade_state', type: 'tag', tags: arrToObj(this.$dictData.trade_state), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '状态描述', prop: 'trade_state_des'},
         { label: '房屋类型', prop: 'house_type', fullShow: true, type: 'flag', flags: arrToObj(this.$dictData.trade_house_type) },
         { label: '成交店员', prop: 'deal_clerk' },
         { label: '成交楼盘', prop: 'deal_item' },
@@ -86,10 +101,11 @@ export default {
         { label: '面积(㎡)', prop: 'area' },
         { label: '总价(元)', prop: 'price' },
         { label: '创建时间', prop: 'create_at' },
-        { label: '操作', width: 200, type: 'handle2', operations:
+        { label: '操作', width: 230, type: 'handle2', operations:
           [
+            { label: '维护', func: this.openStatePopup, btnType: 'info' },
             { label: '编辑', func: this.openPopup, btnType: 'success' },
-            { label: '成交详情', func: this.openQPopup, btnType: 'primary' },
+            { label: '详情', func: this.openQPopup, btnType: 'primary' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
@@ -111,6 +127,20 @@ export default {
         this.fetchData()
       }
     },
+    openStatePopup (row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isStateShow = true
+    },
+    closeStatePopup (obj) {
+      this.isStateShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    },
     delHandle(row) {
       this.$msg(`您确定要删除该报备吗?`, 'confirm', () => {
         this.$api.cust.admtradedel({

Some files were not shown because too many files changed in this diff