230320a303 9 月之前
父节点
当前提交
d67634466c

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.8bffbb1b.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.c01b8702.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-d43c9a16.2e5286e7.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-d43c9a16.a7029ec3.js


+ 6 - 0
src/api/house.js

@@ -320,6 +320,12 @@ export default {
   admeshouseshow: params => { // 新版 小程序上房源  显示隐藏
     return getRequest('/adm/eshouse/show', params, 'loading')
   },
+  admeshousesell: params => { // 新版 小程序上房源  上架房源
+    return getRequest('/adm/eshouse/sell', params, 'loading')
+  },
+  admeshousesold: params => { // 新版 小程序上房源  下架房源
+    return getRequest('/adm/eshouse/sold', params, 'loading')
+  },
   admeshouseadd: params => { // 上房源  添加
     return getRequestNoSort('/adm/eshouse/add', params, 'loading')
   },

+ 1 - 1
src/views/room/components/searchForm/Index.vue

@@ -40,7 +40,7 @@ export default {
         },
         // { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
         { label: '状态', key: 'hide_status', type: 'select', options: this.$dictData.hide_status},
-        // { label: '楼盘类型', key: 'product_type', type: 'select', options: this.$dictData.product_type},
+        { label: '已售', key: 'is_sold', type: 'select', options: this.$dictData.sys_yesno},
         // { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
       ]
       this.setDefaultValue(params, 'searchData')

+ 29 - 3
src/views/room/index.vue

@@ -53,6 +53,8 @@ export default {
       const arr = [...this.tableData]
       arr.map(item => {
         item.pri_image = this.IMadd(item.pri_image)
+        if (Number(item.is_sold) !== 1) item.noSold = true
+        if (Number(item.is_sold) === 1) item.isSold = true
       })
       return arr
     }
@@ -62,6 +64,7 @@ export default {
     this.listConfig = {
       rows: [
         // { label: '排序', prop: 'sort', type: 'input', width: 80},
+        { label: '已售', prop: 'is_sold', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
         { label: '编号', prop: 'id' },
         { label: '楼盘', prop: 'estate_name' },
         { label: '楼盘', prop: 'house_no' },
@@ -73,7 +76,6 @@ export default {
         { label: '面积㎡', prop: 'area' },
         { label: '所属区域', prop: 'area_type', type: 'flag', flags: arrToObj(this.$dictData.area_type) },
         { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
-        { label: '已售', prop: 'is_sold', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno), tagTypeObj: {'1': 'success', '2': 'danger'} },
         { label: '售出', prop: 'sold_platform' },
         { label: '更新时间', prop: 'update_at' },
         { label: '创建人', prop: 'sale_name' },
@@ -81,7 +83,9 @@ export default {
         { label: '操作', width: 220, type: 'handle2', operations:
           [
             { label: '编辑', func: this.openPopup, btnType: 'primary' },
-            { label: '删除', func: this.delHandle, btnType: 'danger' },
+            // { label: '删除', func: this.delHandle, btnType: 'danger' },
+            { label: '重新上架', func: this.reupHandle, btnType: 'warning', hide: 'noSold' },
+            { label: '下架', func: this.downHandle, btnType: 'warning', hide: 'isSold' },
             { labelFor: 'hide_status', disabled: true, func: this.statusHandle, hide: 'nosys',
               labelConfig: {
                 texts: {
@@ -112,7 +116,7 @@ export default {
           this.fetchData()
         })
       }, null, true)
-    },
+    }, 
     // saveHandle (row) {
     //   this.$api.house.admoldhousesortedit({
     //     id: row.id,
@@ -122,7 +126,29 @@ export default {
     //     this.fetchData()
     //   })
     // },
+    downHandle (row) {
+      this.$msg(`您确定要下架该房源吗?`, 'confirm', () => {
+        this.$api.house.admeshousesold({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已上架!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    reupHandle (row) {
+      this.$msg(`您确定要重新上架该房源吗?`, 'confirm', () => {
+        this.$api.house.admeshousesell({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已上架!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
     delHandle(row) {
+      this.$msg(`暂时关闭!`)
+      return
       this.$msg(`您确定要删除该房源吗?`, 'confirm', () => {
         this.$api.house.admeshousedel({
           id: row.id,

部分文件因为文件数量过多而无法显示