From 44a85343a5ccb4f7495aae336a604ec2fa36b1fa Mon Sep 17 00:00:00 2001 From: sundongyu <2811054731@qq.com> Date: Tue, 9 Apr 2024 13:08:04 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E8=A1=A8=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E7=BB=B4=E5=BA=A6=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/modules/sdy.js | 49 ++- package-lock.json | 28 ++ package.json | 1 + src/api/receivables-management/management.js | 11 +- src/layout/components/LayoutAside.vue | 3 + .../receivables-management/studentLoan.vue | 402 ++++++++++++++++++ src/router/modules/receivablesManagement.js | 6 + 7 files changed, 498 insertions(+), 2 deletions(-) create mode 100644 src/pages/receivables-management/studentLoan.vue diff --git a/mock/modules/sdy.js b/mock/modules/sdy.js index f748914..cf606e8 100644 --- a/mock/modules/sdy.js +++ b/mock/modules/sdy.js @@ -13,6 +13,20 @@ const data = Mock.mock({ } ] }) +const loans = Mock.mock({ + "list|45": [ + { + "id|+1": 1, + 'proposer': '@cname', + 'student': '@integer(100000000,999999999)', + 'allowance': '@integer(10000,50000)', + 'department': '@pick(["机电工程系","护理分院","建筑系","材料科学与工程系","环境科学与工程系"])', + 'cation': '@pick(["2021-2022学年度","2022-2023学年度"])', + 'loanTerm': '@pick(["已放款","未放款"])', + 'timeofapplication': '@date("yyyy-MM-dd")', + } + ] +}) export default [ { url: '/get-sdy-managment-list', @@ -58,5 +72,38 @@ export default [ code: 200, } } - } + }, + // 借款管理 + { + url: '/get-sdy-loan-list', + method: 'get', + response: () => { + return { + code: 200, + data: loans + } + } + }, + // 添加借款人 + { + url: '/post-sdy-loan-add', + method: 'post', + response: (req) => { + const newLoan = { + id: loans.list.length + 1, + proposer: req.body.proposer, + student: req.body.student, + allowance: req.body.allowance, + department: req.body.department, + cation: req.body.cation, + loanTerm: req.body.loanTerm, + timeofapplication: req.body.timeofapplication, + } + loans.list.push(newLoan) + return { + code: 200, + data: newLoan + } + } + }, ] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7f33dcb..243e37f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^1.6.8", "dayjs": "^1.11.10", + "echarts": "^5.5.0", "less": "^4.2.0", "mockjs": "^1.1.0", "pinia": "^2.1.7", @@ -1024,6 +1025,20 @@ "node": ">=0.4.0" } }, + "node_modules/echarts": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", + "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.5.0" + } + }, + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/ee-first": { "version": "1.1.1", "license": "MIT" @@ -2058,6 +2073,19 @@ "version": "3.1.1", "dev": true, "license": "ISC" + }, + "node_modules/zrender": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz", + "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", + "dependencies": { + "tslib": "2.3.0" + } + }, + "node_modules/zrender/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } } } diff --git a/package.json b/package.json index 98f0615..a027f07 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "axios": "^1.6.8", "dayjs": "^1.11.10", + "echarts": "^5.5.0", "less": "^4.2.0", "mockjs": "^1.1.0", "pinia": "^2.1.7", diff --git a/src/api/receivables-management/management.js b/src/api/receivables-management/management.js index f7740e3..317622d 100644 --- a/src/api/receivables-management/management.js +++ b/src/api/receivables-management/management.js @@ -1,8 +1,17 @@ import request from '@/utils/request' - +// 收款管理 export function APIReceivablesList() { return request.get('/get-sdy-managment-list') } +//查询收款 export function APIReceivablesAdd(data) { return request.post('/post-sdy-managment-find', data) +} +//贷款管理 +export function APILoansList() { + return request.get('/get-sdy-loan-list') +} +//查询贷款 +export function APILoansAdd(data) { + return request.post('/post-sdy-loan-add', data) } \ No newline at end of file diff --git a/src/layout/components/LayoutAside.vue b/src/layout/components/LayoutAside.vue index 7647ca5..133932b 100644 --- a/src/layout/components/LayoutAside.vue +++ b/src/layout/components/LayoutAside.vue @@ -42,6 +42,9 @@ 学生收款 + + 助学贷款 +