230320a303 1 rok temu
rodzic
commit
9da0331935

Plik diff jest za duży
+ 0 - 0
dist/index.html


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-656b80e2.79f9639e.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-af3f840c.79e19f15.css


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.b01c75cc.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.b32b41d9.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-26dcdecf.c6ac9fa9.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-656b80e2.f7637286.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-af3f840c.1d9032d2.js


+ 9 - 0
src/api/house.js

@@ -163,6 +163,15 @@ export default {
   admpricelist: params => { // 历史成交价 - 列表接口
     return getRequest('/adm/estate/price/list', params)
   },
+  admestatepricegenerate: params => { // 历史成交价 - 批量生成接口
+    return getRequest('/adm/estate/price/generate', params)
+  },
+  // admestatepricegenerate: params => { // 历史成交价 - 批量生成接口
+  //   return getRequest('http://192.168.0.31:8888/adm/menu/test', params)
+  // },
+  admestatepricebatch: params => { // 历史成交价 - 历史价格批量添加
+    return getRequest('/adm/estate/price/batch', params)
+  },
   admpriceadd: params => { // 历史成交价 - 添加
     return getRequestNoSort('/adm/estate/price/add', params, 'loading')
   },

+ 142 - 2
src/views/house/components/popup/PriceEdit.vue

@@ -19,13 +19,66 @@
           <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
         </div>
       </div>
+      <div class="scoped-line"></div>
+      <div class="scoped-batch">
+        <div class="title">批量上传成交价</div>
+        <textarea class="text" v-model="batchText" placeholder="请截图新的成交价并微信长按识别,不要有多余文字"></textarea>
+        <!-- <tinymce ref="refContent" v-model="batchText" :height="300" /> -->
+
+        <!-- 4室2厅-143.63m2-3/25层 158.60万 
+签约日期:2024-04-12 11042.13元/m 
+4室2厅-129.75m-20/27层 136.24万 
+签约日期:2024-04-10 10500.00元/m 
+3室2厅-89.56m-3/27层 81.50万 
+签约日期:2024-04-10 9100.00元/m 
+3室2厅-111.63m2-26/27层 119.03万 
+签约日期:2024-04-08 10662.65元/m2 
+3室2厅-89.16m2-21/27层 87.80万 
+签约日期:2024-03-30 9847.27元/m 
+4室2厅-129.75m2-23/27层 136.24万 
+签约日期:2024-03-29 10500.00元/m 
+3室2厅-111.63m2-16/27层 113.65万 
+签约日期:2024-03-23 10180.74元/m 
+3室2厅-100.45m2-17/27层 107.05万 
+签约日期:2024-03-20 10657.47元/m -->
+
+
+<!-- 2室2厅-86.88m2-25/34层 56.80万 
+签约中介:我爱我家 签约日期:2024-03-07 6538元/m 
+3室2厅-116.19m²-14/32层 72.00万 
+签约中介:中环地产 签约日期:2024-02-19 6197元/m² 
+3室2厅-109.40m²-30/34层 65.50万 
+签约中介:中环地产 签约日期:2024-02-04 5988元/m 
+3室2厅-99.83m²-32/34层 63.00万 
+签约中介:我爱我家 签约日期:2024-01-31 6311元/m2 
+3室2厅-130.44m²-13/16层 100.00万 
+签约中介:齐家房产
+签约日期:2024-01-18 7667元/m 
+3室2厅-115.46m²-18/29层 91.00万 
+签约中介:中环地产 签约日期:2024-01-15 7882元/m2 
+3室2厅-114.23m²-30/31层 59.60万 
+签约中介:中环地产
+签约日期:2024-01-12 5218元/m2 -->
+
+        <table-list
+          v-if="curDataList.length > 0"
+          :list-loading="listLoading"
+          :data="curDataList"
+          :columns="listConfig"
+          :page-size="-1"
+          @selection-change="selectionChange"
+        />
+        <el-button type="primary" @click="generateHandle">解析[{{ curObj.estate_tag === '二手' ? '二手房' : '新房'  }}]成交数据</el-button>
+        <el-button type="success" @click="batchHande">批量插入到[{{ curObj.estate_name }}]</el-button>
+        <el-button type="danger" @click="close">关闭弹窗</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
 <script>
 import { arrToObj } from '@/utils'
+import baseTable from '_m/baseTable.js'
 export default {
-  components: { },
   mixins,
   props: {
     isShow: Boolean,
@@ -36,8 +89,13 @@ export default {
     return {
       loading: false,
       formData: [],
+      batchText: '',
+      noCreated: true,
+      multipleSelection: [],
+      curDataList: [],
     }
   },
+  mixins: [...mixins, baseTable],
   watch: {
     isShow: function(val) {
       if (val) {
@@ -45,7 +103,58 @@ export default {
       }
     },
   },
+  computed: {
+  },
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { type: 'selection' },
+        { label: '面积', prop: 'area', type: 'input', width: 80 },
+        { label: '楼层', prop: 'cur_layer', type: 'input', width: 80 },
+        { label: '总楼层', prop: 'layer', type: 'input', width: 80 },
+        { label: '总价(万)', prop: 'price', type: 'input', width: 80 }, 
+        { label: '中介', prop: 'company', type: 'input', width: 80 },
+        // { label: '日期', prop: 'sign_at', type: 'input', width: 80 },
+        { label: '单价', prop: 'unit_price', type: 'input', width: 100 },
+        { label: '日期', prop: 'time' },
+        // { label: '备注 ', prop: 'remark', type: 'input' },
+      ]
+    }
+  },
   methods: {
+    batchHande () {
+      if (this.multipleSelection.length > 0) {
+        console.log(this.multipleSelection)
+        this.$api.house.admestatepricebatch({
+          data: JSON.stringify(this.multipleSelection),
+          estate_id: this.curObj.eid
+        }).then(data => {
+          this.$msg('批量插入成功')
+          this.curDataList = []
+          this.batchText = ''
+          this.multipleSelection = []
+        })
+      } else {
+        this.$msg('请选择要插入的数据')
+      }
+    },
+    selectionChange(val) {
+      this.multipleSelection = val
+    },
+    generateHandle () {
+      if (this.batchText) {
+       const batchText = this.batchText.replace(/ /g, '\t')
+        this.$api.house.admestatepricegenerate({
+          data: batchText,
+          is_new: this.curObj.estate_tag === '二手' ? 2 : 1,
+        }).then(data => {
+          this.curDataList = data || []
+            // this.curDataList = [...curData]
+          })
+      } else {
+        this.$msgs('请输入数据')
+      }
+    },
     getDef (str) {
       let params = { ...this.curObj }
       if (str === 'price') {
@@ -105,12 +214,18 @@ export default {
             this.$api.house[apiStr](newForm).then(data => {
               this.$msgs(newForm.estate_id ? '编辑成功' : '新增成功')
               this.$emit('close', newForm)
+              this.curDataList = []
+              this.batchText = ''
+              this.multipleSelection = []
             })
           }
         })
       } else {
-        this.$emit('close')
+        this.$emit('close', {})
         this.setDefaultValue()
+        this.curDataList = []
+        this.batchText = ''
+        this.multipleSelection = []
       }
     },
   }
@@ -128,4 +243,29 @@ export default {
     height: 300px;
   }
 }
+
+.scoped-line {
+  height: 2px;
+  width: 100%;
+  background: #ccc;
+  margin: 20px 0;
+}
+
+.scoped-batch {
+  padding-bottom: 20px;
+  .title {
+    text-align: center;
+    padding-bottom: 10px;
+    font-weight: bold;
+    color: #333;
+    font-size: 16px;
+  }
+  .text {
+    border: 1px solid #dcdcdc;
+    border-radius: 6px;
+    width: 100%;
+    min-height: 100px;
+    padding: 10px;
+  }
+}
 </style>

+ 1 - 1
src/views/house/components/searchForm/Price.vue

@@ -60,7 +60,7 @@ export default {
       this.setDefaultValue(params, 'searchData')
     },
     estateChange (val, options, curItem) {
-      this.$router.push(`/house/price?id=${val}&name=${curItem.estate_name}`)
+      this.$router.push(`/house/price?id=${val}&name=${curItem.estate_name}&t=${curItem.estate_tag}`)
       // this.$router.go(0)
       this.searchHandle()
     },

+ 1 - 1
src/views/house/index.vue

@@ -211,7 +211,7 @@ export default {
       this.$router.push('/house/news?id=' + item.id)
     },
     openPrice (item) {
-      this.$router.push('/house/price?id=' + item.id + '&name=' + item.estate_name)
+      this.$router.push('/house/price?id=' + item.id + '&name=' + item.estate_name + '&t=' + item.estate_tag)
     },
     openSale (item) {
       this.$router.push('/house/sale?id=' + item.id + '&name=' + item.estate_name)

+ 10 - 1
src/views/house/price.vue

@@ -97,8 +97,17 @@ export default {
     openPopup(row) {
       if (row && row.id) {
         this.curObj = row
+        const query = this.$route.query
+        this.curObj.estate_tag = query.t
+        this.curObj.estate_name = query.name
+        this.curObj.eid = query.id
       } else {
-        this.curObj = {}
+        const query = this.$route.query
+        this.curObj = {
+          estate_tag: query.t,
+          estate_name: query.name,
+          eid: query.id,
+        }
       }
       this.isDtlShow = true
     },

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików