Browse Source

加入黑名单

shibei_master
ZhaoTongYao 3 years ago
parent
commit
2d0422ae21
  1. 2
      src/views/modules/plugins/rent/rentblacklist-add-or-update.vue
  2. 58
      src/views/modules/plugins/rent/resi.vue

2
src/views/modules/plugins/rent/rentblacklist-add-or-update.vue

@ -163,6 +163,8 @@ export default {
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
console.log(this.dataForm)
return
if (!valid) { if (!valid) {
return false return false
} }

58
src/views/modules/plugins/rent/resi.vue

@ -261,7 +261,16 @@
:userId="lookInfo.userId" :userId="lookInfo.userId"
:gridName="lookInfo.gridName" :gridName="lookInfo.gridName"
@close="handleCancleLook" /> @close="handleCancleLook" />
<el-dialog
title="加入黑名单的原因"
:visible.sync="blacklistVisible"
width="40%">
<textarea v-model="blacklistReason" placeholder="请输入加入黑名单的原因" class="blacklist-reason"></textarea>
<span slot="footer" class="dialog-footer">
<el-button @click="blacklistVisible = false"> </el-button>
<el-button type="primary" @click="confirmJoinBlacklist"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -333,7 +342,10 @@ export default {
lookInfo: { lookInfo: {
userId: '', userId: '',
gridName: '' gridName: ''
} },
blacklistVisible: false, //
blacklistReason: '', //
rowData: {}, //
} }
}, },
props: { props: {
@ -376,7 +388,7 @@ export default {
this.pageLoading = true this.pageLoading = true
this.searchH = this.$refs.resiSearch.$el.offsetHeight this.searchH = this.$refs.resiSearch.$el.offsetHeight
console.log('storeoooo----0000', this.$store) console.log('storeoooo----0000', this.$store)
console.log('resiSearch', this.$refs.resiSearch.$el.offsetHeight) // console.log('resiSearch', this.$refs.resiSearch.$el.offsetHeight)
}, },
mounted () { mounted () {
@ -400,7 +412,34 @@ export default {
}) })
}, },
joinBlacklist (row) { joinBlacklist (row) {
console.log(row) this.blacklistVisible = true
this.blacklistReason = ''
this.rowData = { ...row }
},
confirmJoinBlacklist () {
const params = {
idCard: this.rowData.ID_CARD,
name: this.rowData.NAME,
mobile: this.rowData.MOBILE,
gender: this.rowData.GENDER == '女' ? '0' : this.rowData.GENDER == '男' ? '1' : '',
type: '1',
userid: this.rowData.icResiUserId,
joinReason: this.blacklistReason
}
this.$http.post('/pli/power/rentBlacklist/save', params).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.blacklistVisible = false
this.getTableData()
}
})
}).catch(() => {})
}, },
checkSelect (row, index) { checkSelect (row, index) {
@ -528,7 +567,6 @@ export default {
return _val || row[item.columnName] return _val || row[item.columnName]
}, },
handleSearch (val) { handleSearch (val) {
console.log('searchhh--', val)
this.currentPage = 1 this.currentPage = 1
this.conditions = val this.conditions = val
this.getTableData() this.getTableData()
@ -940,7 +978,6 @@ export default {
this.tableHeader.push(item) this.tableHeader.push(item)
} }
}) })
console.log('xxxxxxxxxxxxxxx', this.tableHeader)
} }
}) })
.catch(() => { .catch(() => {
@ -1299,4 +1336,13 @@ export default {
margin-top: 15px; margin-top: 15px;
} }
} }
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style> </style>

Loading…
Cancel
Save