From 1ead58043e786b6f6901e919f75d577c8b34dbe6 Mon Sep 17 00:00:00 2001 From: zzh <2441574824@qq.com> Date: Fri, 9 Aug 2024 11:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/customer.js | 63 ++++++ src/layout/components/Navbar.vue | 27 ++- src/store/modules/user.js | 4 +- src/views/pay/customer/index.vue | 369 +++++++++++++++++++++++++++++++ vue.config.js | 2 +- 5 files changed, 458 insertions(+), 7 deletions(-) create mode 100644 src/api/pay/customer.js create mode 100644 src/views/pay/customer/index.vue diff --git a/src/api/pay/customer.js b/src/api/pay/customer.js new file mode 100644 index 0000000..562f2aa --- /dev/null +++ b/src/api/pay/customer.js @@ -0,0 +1,63 @@ +import request from '@/utils/request' + +//查询客户列表 +export function selectList(data){ + return request({ + url: "/pay/customer/list", + method: "POST", + data:data + }) +} +//获取未入住的code +export function customerAll(data){ + return request({ + url: "/pay/customer/all", + method: "GET", + data:data + }) +} + + +//添加 +export function save(data){ + return request({ + url: "/pay/customer", + method: "POST", + data:data + }) +} +//修改 +export function update(data){ + return request({ + url: `/pay/customer/${data.id}`, + method: "PUT", + data:data + }) +} +//获取单条 +export function get(id){ + return request({ + url: "/pay/customer/"+id, + method: "GET", + }) +} + +//客户信息删除 +export function del(id){ + return request({ + url: `/pay/customer/${id}`, + method: "DELETE", + }) +} +//通过id启用客户 +export function enable(id){ + return request({ + url: `/pay/customer/enable/${id}`, + }) +} +//通过id禁用客户 +export function disable(id){ + return request({ + url: `/pay/customer/disable/${id}`, + }) +} diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 6e1ce98..04797a6 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -18,7 +18,17 @@ :visible.sync="drawer" :with-header="false" size="50%"> - + + 全部 + 通知 + 公告 + + + + 全部 + 已读 + 未读 + @@ -171,11 +181,20 @@ export default { }) }, - findNoticeByStatus(){ + findNoticeByStatus(status,state){ + if (status==null && state==null){ + this.status="" + this.state="" + } + if (status!=null){ + this.status=status + } + if (state!=null){ + this.state=state + } findNoticeByStatus(this.status,this.state).then((res)=>{ - this.noticeList=res.data.rows - console.log(this.noticeList) + console.log(res) }) }, diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6c109a6..9a21fae 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -45,8 +45,8 @@ const user = { return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { let data = res.data - setToken(data.access_token) - commit('SET_TOKEN', data.access_token) + setToken(data.accessToken) + commit('SET_TOKEN', data.accessToken) setExpiresIn(data.expires_in) commit('SET_EXPIRES_IN', data.expires_in) resolve() diff --git a/src/views/pay/customer/index.vue b/src/views/pay/customer/index.vue new file mode 100644 index 0000000..06630fa --- /dev/null +++ b/src/views/pay/customer/index.vue @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + 新增 + + + + + 导出 + + + + + + + + + + + + {{ customer.appName }} + + + + + + + + + + + + + + + + + + 客户名称 + {{ customer.appName }} + + + 客户编码 + {{ customer.appCode }} + + + 创建人 + {{ customer.createBy }} + + + 创建日期 + {{ customer.createTime }} + + + 近5笔交易记录 + + + + + + + + + + + + + + + + + + + + {{form.appCode}} + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + 取 消 + 提 交 + + + + + + + + + + + diff --git a/vue.config.js b/vue.config.js index dd8b15d..fdc4fa5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + target: `http://36.138.173.120:81/prod-api`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''