|
@@ -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,
|