From 3e8ec67400f6568ddcacc307db8a41114667f35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=B0=8F=E6=9E=97?= <320730042@qq.com> Date: Wed, 5 Jun 2024 17:59:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/api/customer/index.ts | 23 +- src/api/customer/types.ts | 13 + src/router/index.ts | 11 + .../customer/components/AddCustom.vue | 588 ++++++++++++++++++ src/views/resources/customer/index.vue | 227 +++++++ 6 files changed, 862 insertions(+), 2 deletions(-) create mode 100644 src/views/resources/customer/components/AddCustom.vue create mode 100644 src/views/resources/customer/index.vue diff --git a/src/App.vue b/src/App.vue index 2e1819e..eda074f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,7 +47,7 @@ const fontColor = computed(() => { .el-card__footer { padding: calc(10px - 2px) 10px !important; } -.is-horizontal { +.el-scrollbar__thumb { display: none !important; } diff --git a/src/api/customer/index.ts b/src/api/customer/index.ts index dbd70de..2e8a7dd 100644 --- a/src/api/customer/index.ts +++ b/src/api/customer/index.ts @@ -1,5 +1,5 @@ import { AxiosPromise } from "axios"; -import { CustomerResult } from "@/api/customer/types"; +import { CustomerResult, CustomForm } from "@/api/customer/types"; import request from "@/utils/request"; export function customerPage(data: SelectForm): AxiosPromise { @@ -9,3 +9,24 @@ export function customerPage(data: SelectForm): AxiosPromise { data, }); } + +export function updateStatus(customId?: number, status?: string) { + return request({ + url: `/api/customer/v1/update-status/${customId}/${status}`, + method: "PUT", + }); +} +export function deleteCustom(ids: number[]) { + return request({ + url: `/api/customer/v1/delete-custom`, + method: "POST", + data: ids, + }); +} +export function addCustom(data: CustomForm): AxiosPromise { + return request({ + url: `/api/customer/v1/add-custom`, + method: "POST", + data, + }); +} diff --git a/src/api/customer/types.ts b/src/api/customer/types.ts index 2b388d6..e91a1a4 100644 --- a/src/api/customer/types.ts +++ b/src/api/customer/types.ts @@ -6,3 +6,16 @@ export interface CustomerVO { regionAreaName?: string; } export type CustomerResult = PageResult; +export interface CustomForm { + custId?: number; + regionAreaId?: number; + customAccount?: string; + customName?: string; + customAddr?: string; + contactType?: string; + customType?: string; + customStatus?: string; + customRemark1?: string; + customRemark2?: string; + customRemark3?: string; +} diff --git a/src/router/index.ts b/src/router/index.ts index d963773..fc3eb66 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -171,6 +171,17 @@ export const constantRoutes: RouteRecordRaw[] = [ title: "设备绑定客户", }, }, + { + path: "/resources/custom-add", + name: "AddCustom", + component: () => + import("@/views/resources/customer/components/AddCustom.vue"), + meta: { + hidden: true, + keepAlive: true, + title: "新增客户", + }, + }, ], }, ]; diff --git a/src/views/resources/customer/components/AddCustom.vue b/src/views/resources/customer/components/AddCustom.vue new file mode 100644 index 0000000..4ca9202 --- /dev/null +++ b/src/views/resources/customer/components/AddCustom.vue @@ -0,0 +1,588 @@ + + + + + diff --git a/src/views/resources/customer/index.vue b/src/views/resources/customer/index.vue new file mode 100644 index 0000000..149d0a6 --- /dev/null +++ b/src/views/resources/customer/index.vue @@ -0,0 +1,227 @@ + + + + +