From e242f54431c2033f389082cf44928d2ac7aa5dc2 Mon Sep 17 00:00:00 2001 From: yangpeng <3074487626@qq.com> Date: Sun, 11 Aug 2024 10:31:53 +0800 Subject: [PATCH] =?UTF-8?q?fix():=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/customer.js | 62 +++++-- src/views/pay/customer/index.vue | 270 ++++++++++++++++--------------- 2 files changed, 184 insertions(+), 148 deletions(-) diff --git a/src/api/pay/customer.js b/src/api/pay/customer.js index 5f4db4b..588c1aa 100644 --- a/src/api/pay/customer.js +++ b/src/api/pay/customer.js @@ -1,34 +1,66 @@ -import request from '@/utils/request' +import request from "@/utils/request"; //查看客户列表 export function selectList(data) { return request({ - url:'/pay/customer/list', - method:"POST", - data:data + url: '/pay/customer/list', + method: 'POST', + data: data }) } //请求未入住的服务code -export function customerAll(){ +export function customerAll() { return request({ - url:'/pay/customer/all', - method:'GET' + url: '/pay/customer/all', + method: 'GET' }) } -//添加 -export function save(data){ +//添加客户 +export function save(data) { return request({ - url:'/pay/customer', - method:'POST' + url: '/pay/customer', + method: 'POST', + data: data + }) +} +//修改客户 +export function update(data) { + return request({ + url: `/pay/customer/${data.id}`, + method: 'PUT', + data: data }) } -//修改 -export function update(data){ +//获取单条 +export function get(orderCustomerId) { return request({ - url:'/pay/customer', - method:'PUT' + url: `/pay/customer/${orderCustomerId}`, + method: 'GET' + }) +} + +//客户信息删除 +export function del(orderCustomerId){ + return request({ + url: `/pay/customer/${orderCustomerId}`, + method: 'DELETE' + }) +} + +//通过ID启动客户 +export function enable(orderCustomerId){ + return request({ + url: `/pay/customer/enable/${orderCustomerId}`, + method: 'GET' + }) +} +//通过ID禁用客户 +export function disable(orderCustomerId){ + return request({ + url: `/pay/customer/disable/${orderCustomerId}`, + method: 'GET' }) } diff --git a/src/views/pay/customer/index.vue b/src/views/pay/customer/index.vue index 4b86252..3abdd0a 100644 --- a/src/views/pay/customer/index.vue +++ b/src/views/pay/customer/index.vue @@ -1,7 +1,5 @@