From a0eca7b1684f757eb7381c6d1f7042c95ae930a2 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期二, 31 十二月 2024 10:37:40 +0800 Subject: [PATCH] 1.批量任务-批量发送详情使用选项卡的方式打开 --- pages/shop/list.vue | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/pages/shop/list.vue b/pages/shop/list.vue index 96192a4..97cf21b 100644 --- a/pages/shop/list.vue +++ b/pages/shop/list.vue @@ -14,6 +14,7 @@ hasDelete: false, operationAttrs: { width: 150, + fixed: 'right', }, beforeOpen: (data, isNew) => { if (!isNew) { @@ -24,6 +25,7 @@ { label: '商户名称', prop: 'name', minWidth: 150, fixed: 'left' }, { label: '商户昵称', prop: 'nickName', minWidth: 150 }, { label: '所属合伙人', prop: 'partnerName', minWidth: 150 }, + { label: '下单次数', prop: 'orderNum', minWidth: 150 }, { label: '地址', formatter: (row) => this.getDistrict(row), @@ -31,6 +33,17 @@ }, { label: '联系方式', prop: 'tel', minWidth: 150 }, { label: '注册时间', prop: 'createTime', minWidth: 180 }, + { + label: '启用/禁用', + formatter: (row) => ( + <el-switch + value={row.isEnabled} + onChange={this.onEnabledChange.bind(this, row)} + ></el-switch> + ), + minWidth: 120, + fixed: 'right', + }, ], searchForm: [ { @@ -50,6 +63,17 @@ customClass: 'in-bus-form', }, { label: '手机号', id: 'tel', type: 'input' }, + { + label: '启用/禁用', + id: 'isEnabled', + type: 'bus-select-dict', + default: '1', + el: { + code: 'USER_ENABLED_OR_DISABLED', + clearable: true, + style: 'width:100%', + }, + }, ], }, ], @@ -107,6 +131,24 @@ row.address || '' }` }, + onEnabledChange(row, e) { + const url = 'flower/api/customer/page/isEnable' + const text = e ? '启用' : '禁用' + this.$elBusUtil + .confirm(`确定要${text}这个商户吗?`) + .then(async () => { + const { code } = await this.$elBusHttp.request(url, { + params: { + id: row.id, + }, + }) + if (code === 0) { + this.$message.success(`${text}成功`) + this.$refs.crud.getList() + } + }) + .catch(() => {}) + }, }, } </script> -- Gitblit v1.9.3