|
@@ -361,7 +361,7 @@ export default {
|
|
|
} else {
|
|
|
this.shopId = val
|
|
|
}
|
|
|
- this.params.fixedCondition = this.part_view ? 't.shop_id=' + this.shopId+' and t.user_state=0 and t.member_id is not NULL' : 't.user_state = 0 and t.member_id is not NULL'
|
|
|
+ this.params.fixedCondition = this.part_view ? 't.shop_id=' + this.shopId+' and t.member_id is not NULL' : ' t.member_id is not NULL'
|
|
|
this.GET_MemberList()
|
|
|
}
|
|
|
},
|
|
@@ -422,13 +422,14 @@ export default {
|
|
|
sortable: false
|
|
|
},
|
|
|
{
|
|
|
- headerName: this.$t('action.delete'), field: 'id',
|
|
|
+ headerName: this.$t('action.state'), field: 'id',
|
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
|
cellRendererParams: param => {
|
|
|
+ console.log(param)
|
|
|
return {
|
|
|
- onClick: this.deleteSingle,
|
|
|
- label: this.$t('action.delete'),
|
|
|
- buttonType: 'danger',
|
|
|
+ onClick: (param.data.user_state===0?this.deleteSingle:this.enableClerk),
|
|
|
+ label: (param.data.user_state===0?this.$t('action.disabled'):this.$t('action.enabled')),
|
|
|
+ buttonType: (param.data.user_state===0?'danger':'primary'),
|
|
|
buttonSize: 'mini'
|
|
|
}
|
|
|
},
|
|
@@ -492,7 +493,7 @@ export default {
|
|
|
} else {
|
|
|
this.shopId = this.partId
|
|
|
}
|
|
|
- this.params.fixedCondition = this.part_view ? 'shop_id=' + this.shopId +' and user_state=0': 'user_state=0 and member_id is not null'
|
|
|
+ this.params.fixedCondition = this.part_view ? 'shop_id=' + this.shopId : ' member_id is not null'
|
|
|
this.GET_MemberList()
|
|
|
this.getRoles({ page_size: 200, page_no: 1, fixedCondition: ' shop_id = -1', sort: ' role_id', dir: 'desc' })
|
|
|
|
|
@@ -531,6 +532,24 @@ export default {
|
|
|
deleteSingle(row) {
|
|
|
this.handlerDelete(row.clerk_id)
|
|
|
},
|
|
|
+
|
|
|
+ enableClerk(row){
|
|
|
+ API_Clerk.enableClerk(row.clerk_id).then(
|
|
|
+ response => {
|
|
|
+ this.GET_MemberList()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: this.$t('action.handleSuccess')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ ).catch(response => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: response.message
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
/** 单条数据删除处理 */
|
|
|
handlerDelete(ids) {
|
|
|
this.$confirm(this.$t('member.disableClerk'), this.$t('action.waring'), {
|
|
@@ -803,6 +822,7 @@ export default {
|
|
|
document.body.style.overflow = 'hidden'
|
|
|
this.showViewer = true
|
|
|
},
|
|
|
+
|
|
|
closeViewer() {
|
|
|
document.body.style.overflow = prevOverflow
|
|
|
this.showViewer = false
|