From 4aad49e92a93eb9f708918a8c5ba7af2cf862bdc Mon Sep 17 00:00:00 2001
From: mayf <m13160102112@163.com>
Date: 星期二, 08 十月 2024 19:26:50 +0800
Subject: [PATCH] 财务报表优化

---
 pages/supplier/list.vue |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/pages/supplier/list.vue b/pages/supplier/list.vue
index 971ee56..c866535 100644
--- a/pages/supplier/list.vue
+++ b/pages/supplier/list.vue
@@ -43,6 +43,8 @@
           },
           { label: '联系人', prop: 'contactName', minWidth: '100px' },
           { label: '联系方式', prop: 'contactTel', minWidth: '120px' },
+          { label: '用户ID', prop: 'userId', minWidth: '240px' },
+          { label: '注册手机号', prop: 'registerTel', minWidth: '120px' },
           { label: '注册时间', prop: 'createTime', minWidth: '180px' },
           { label: '审核通过时间', prop: 'passTime', minWidth: '180px' },
           { label: '所属集货站', prop: 'stationName', minWidth: '120px' },
@@ -53,6 +55,17 @@
               <el-switch
                 value={row.showed}
                 onChange={this.onShownChange.bind(this, row)}
+              ></el-switch>
+            ),
+            minWidth: 120,
+            fixed: 'right',
+          },
+          {
+            label: '启用/禁用',
+            formatter: (row) => (
+              <el-switch
+                value={row.isEnabled}
+                onChange={this.onEnabledChange.bind(this, row)}
               ></el-switch>
             ),
             minWidth: 120,
@@ -86,6 +99,17 @@
               {
                 ...getStationListConfig(),
                 label: '所属集货站',
+              },
+              {
+                label: '启用/禁用',
+                id: 'isEnabled',
+                type: 'bus-select-dict',
+                default: '1',
+                el: {
+                  code: 'USER_ENABLED_OR_DISABLED',
+                  clearable: true,
+                  style: 'width:100%',
+                },
               },
             ],
           },
@@ -337,6 +361,24 @@
         })
         .catch(() => {})
     },
+    onEnabledChange(row, e) {
+      const url = 'flower/api/supplier/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