liujq 4 éve
szülő
commit
cb6d118efd

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/index.html


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/css/chunk-6d217c42.eb9393cf.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.41f1d499.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/app.462e70eb.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/chunk-2d5db2d7.52d4baa5.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/chunk-5e2fd652.c1bdcbd1.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/static/js/chunk-6d217c42.1723dbd9.js


+ 15 - 0
src/api/house.js

@@ -115,4 +115,19 @@ export default {
   admlanddel: params => { // 土拍 - 删除
     return getRequestNoSort('/adm/land/del', params, 'loading')
   },
+  admpricelist: params => { // 历史成交价 - 列表接口
+    return getRequest('/adm/estate/price/list', params)
+  },
+  admpriceadd: params => { // 历史成交价 - 添加
+    return getRequestNoSort('/adm/estate/price/add', params, 'loading')
+  },
+  admpriceedit: params => { // 历史成交价 - 编辑
+    return getRequestNoSort('/adm/estate/price/edit', params, 'loading')
+  },
+  admpricedetail: params => { // 历史成交价 - 详情
+    return getRequestNoSort('/adm/estate/price/detail', params, 'loading')
+  },
+  admpricedel: params => { // 历史成交价 - 删除
+    return getRequestNoSort('/adm/estate/price/del', params, 'loading')
+  },
 }

+ 108 - 0
src/views/house/components/popup/PriceEdit.vue

@@ -0,0 +1,108 @@
+<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">
+      </base-form>
+      <div class="xl-form">
+        <div class="xl-form-footer">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      loading: false,
+      formData: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef (str) {
+      let params = { ...this.curObj }
+      if (str === 'price') {
+        params = {...this.$refs.ruleForm.baseForm}
+        if (params.area && params.unit_price) {
+          params.price = (params.area * params.unit_price / 10000).toFixed(1)
+          if (params.price.charAt(params.price.length - 1) === '0') {
+            params.price = parseInt(params.price)
+          }
+        }
+      }
+      this.formData = [
+        { label: '签约日期', key: 'sign_at', type: 'datePicker', type2: 'date', class: 'c-2'},
+        { label: '签约中介', key: 'company', class: 'c-2'}, 
+        { label: '面积', key: 'area', class: 'c-2', type: 'inputFont', appendFont: '㎡', changeHandle: this.priceChange},
+        { label: '单价', key: 'unit_price', class: 'c-2', type: 'inputFont', appendFont: '元', changeHandle: this.priceChange},
+        { label: '总价', key: 'price', class: 'c-2', type: 'inputFont', appendFont: '万元'},
+      ]
+      this.setDefaultValue(params)
+    },
+    priceChange () {
+      this.getDef('price')
+    },
+    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.estate_id = this.parentData.searchForm.estate_id
+            if (this.imagesArr && this.imagesArr.length > 0) newForm.images = this.imagesArr.join(',')
+            let apiStr = 'admpriceadd'
+            if (this.curObj.id) apiStr = 'admpriceedit'
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.estate_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-date-editor.el-input {
+    width: 100%;
+  }
+  ::v-deep .el-textarea__inner {
+    height: 300px;
+  }
+}
+</style>

+ 45 - 0
src/views/house/components/searchForm/Price.vue

@@ -0,0 +1,45 @@
+<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'],
+  mixins,
+  data() {
+    return {
+      searchData: []
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    getDef (str) {
+      let params = { ...this.$refs.ruleForm.baseForm }
+      this.searchData = [
+        { label: '签约中介', key: 'company' },
+        { label: '签约日期', label2: '开始时间', label3: '结束时间', key: 'startEndTime', type: 'datePicker', rules: 1},
+      ]
+      this.setDefaultValue(params, 'searchData')
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+        delete newForm.startEndTime
+      }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 6 - 2
src/views/house/index.vue

@@ -14,7 +14,7 @@
       @currentChange="pageHandle"
       :isAdd="true"
       @add="openPopup"
-      :operationsDefaultLength="6"
+      :operationsDefaultLength="7"
     />
     <popup-edit
       :isShow="isDtlShow"
@@ -107,12 +107,13 @@ export default {
         { label: '创建时间', prop: 'create_at' },
         { label: '更新人', prop: 'update_by' },
         { label: '更新时间', prop: 'update_at' },
-        { label: '操作', width: 460, type: 'handle2', operations:
+        { label: '操作', width: 550, type: 'handle2', operations:
           [
             { label: '保存排序', func: this.saveHandle, btnType: 'success' },
             { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
             { label: '编辑相册', func: this.openPhotoPopup, btnType: 'info' },
             { label: '楼盘动态', func: this.openNews, btnType: 'info' },
+            { label: '历史成交价', func: this.openPrice, btnType: 'info' },
             { label: '模块主题', func: this.openTHEPopup, btnType: 'info' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
@@ -144,6 +145,9 @@ export default {
     openNews (item) {
       this.$router.push('/house/news?id=' + item.id)
     },
+    openPrice (item) {
+      this.$router.push('/house/price?id=' + item.id)
+    },
     openPhotoPopup(row) {
       if (row && row.id) {
         this.curObj = row

+ 13 - 13
src/views/house/price.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"
@@ -24,11 +24,11 @@
 </template>
 <script>
 import { arrToObj } from '@/utils'
-import SearchForm from './components/searchForm/News'
-import PopupEdit from './components/popup/NewsEdit'
+import SearchForm from './components/searchForm/Price'
+import PopupEdit from './components/popup/PriceEdit'
 import baseTable from '_m/baseTable.js'
 export default {
-  name: 'HouseNews',
+  name: 'price',
   components: {
     SearchForm,
     PopupEdit,
@@ -41,7 +41,7 @@ export default {
   mixins: [baseTable],
   data() {
     return {
-      apiStr: 'house.admestatenewslist',
+      apiStr: 'house.admpricelist',
       searchForm: {},
       isDtlShow: false,
       // noCreated: true,
@@ -62,17 +62,17 @@ export default {
   mounted() {
     this.listConfig = {
       rows: [
-        { label: '签约日期', prop: 'xxxx'},
-        { label: '面积(㎡)', prop: 'xxxx'},
-        { label: '总价(万元)', prop: 'xxxx'},
-        { label: '单价(万元)', prop: 'xxxx'},
-        { label: '签约中介', prop: 'xxxx'},
+        { label: '签约日期', prop: 'sign_at'},
+        { label: '面积(㎡)', prop: 'area'},
+        { label: '总价(万元)', prop: 'price'},
+        { label: '单价(元)', prop: 'unit_price'},
+        { label: '签约中介', prop: 'company'},
         { 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' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
       ]
@@ -81,7 +81,7 @@ export default {
   methods: {
     delHandle(row) {
       this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
-        this.$api.house.admestatenewsdel({
+        this.$api.house.admpricedel({
           id: row.id,
         }).then(data => {
           this.$msgs(`已删除!`)

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott