From dfdfbd2c5a71c9cdf39bdea0c9eae30435444253 Mon Sep 17 00:00:00 2001
From: sundongyu <2811054731@qq.com>
Date: Sun, 7 Apr 2024 21:41:06 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=E5=AE=8C=E6=88=90?=
=?UTF-8?q?=E5=BA=94=E6=94=B6=E7=AE=A1=E7=90=86=E7=9A=84=E5=AD=A6=E7=94=9F?=
=?UTF-8?q?=E8=B4=B9=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mock/modules/sdy.js | 1 +
package-lock.json | 4 +-
package.json | 1 +
src/layout/components/LayoutAside.vue | 2 +-
.../accountReceivable.vue | 65 ++++--
.../receivables-management/billCollected.vue | 194 ++++++++++++++++++
src/router/modules/receivables-management.js | 6 +
7 files changed, 251 insertions(+), 22 deletions(-)
create mode 100644 src/pages/receivables-management/billCollected.vue
diff --git a/mock/modules/sdy.js b/mock/modules/sdy.js
index 38331f9..f748914 100644
--- a/mock/modules/sdy.js
+++ b/mock/modules/sdy.js
@@ -9,6 +9,7 @@ const data = Mock.mock({
"major": `@pick(['机械制造与自动化', '材料科学与工程', '环境科学与工程', '建筑工程', '护理学'])`,
"grade": `@pick(['机制1班', '材料1班', '环境1班', '建筑1班','护理1班'])`,
"tuition": `@pick(['已付学费', '未缴学费'])`,
+ "tu": 16800,
}
]
})
diff --git a/package-lock.json b/package-lock.json
index bc6aac9..dbf7f58 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.0.0",
"dependencies": {
"axios": "^1.6.8",
+ "dayjs": "^1.11.10",
"less": "^4.2.0",
"mockjs": "^1.1.0",
"pinia": "^2.1.7",
@@ -998,7 +999,8 @@
},
"node_modules/dayjs": {
"version": "1.11.10",
- "license": "MIT"
+ "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.10.tgz",
+ "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"node_modules/debug": {
"version": "4.3.4",
diff --git a/package.json b/package.json
index c275677..98f0615 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"axios": "^1.6.8",
+ "dayjs": "^1.11.10",
"less": "^4.2.0",
"mockjs": "^1.1.0",
"pinia": "^2.1.7",
diff --git a/src/layout/components/LayoutAside.vue b/src/layout/components/LayoutAside.vue
index aee43c0..d011cab 100644
--- a/src/layout/components/LayoutAside.vue
+++ b/src/layout/components/LayoutAside.vue
@@ -14,7 +14,7 @@
- 菜单二
+ 应收款管理
diff --git a/src/pages/receivables-management/accountReceivable.vue b/src/pages/receivables-management/accountReceivable.vue
index 522ca63..05f5711 100644
--- a/src/pages/receivables-management/accountReceivable.vue
+++ b/src/pages/receivables-management/accountReceivable.vue
@@ -78,6 +78,11 @@
}}
{{ row.tuition }}
+
+ 清缴学费
+
@@ -88,6 +93,8 @@ import {
APIReceivablesList,
APIReceivablesAdd
} from '@/api/receivables-management/management'
+import { useRouter } from 'vue-router'
+const router = useRouter()
//表单数据
const formData = reactive({
name: '',
@@ -179,23 +186,6 @@ const CONDITION = [
]
// 表格数据
const tableData = ref([])
-//表单提交
-const onSubmit = async () => {
- const res = await APIReceivablesAdd(formData)
- console.log(res)
- tableData.value = res
- pagination.total = res.length
-}
-// 表格加载状态
-const loading = ref(false)
-//表单重置
-const onReset = () => {
- ReceivablesList()
-}
-// 表格点击事件
-const handleRowClick = e => {
- console.log(e)
-}
// 表格头数据
const columns = ref([
{ colKey: 'serial-number' },
@@ -204,15 +194,43 @@ const columns = ref([
{ colKey: 'department', title: '部门' },
{ colKey: 'major', title: '专业' },
{ colKey: 'grade', title: '班级' },
- { colKey: 'tuition', title: '是否缴费' }
+ { colKey: 'tuition', title: '是否缴费' },
+ { colKey: 'action', title: '操作', align: 'center' }
])
-
// 表格分页数据
let pagination = {
defaultCurrent: 1,
- defaultPageSize: 5,
+ defaultPageSize: 10,
total: 50
}
+//表单提交
+const onSubmit = async () => {
+ if (
+ formData.name ||
+ formData.studentnumber ||
+ formData.department ||
+ formData.major ||
+ formData.grade ||
+ formData.tuition
+ ) {
+ const res = await APIReceivablesAdd(formData)
+ console.log(res)
+ tableData.value = Array.from(res)
+ pagination.total = res.length
+ } else {
+ alert('请填写完整信息')
+ }
+}
+// 表格加载状态
+const loading = ref(false)
+//表单重置
+const onReset = () => {
+ ReceivablesList()
+}
+// 表格点击事件
+const handleRowClick = e => {
+ console.log(e)
+}
//获取表格数据
const ReceivablesList = async () => {
loading.value = true
@@ -229,6 +247,13 @@ const onPageChange = (Newpage, PreviousPagePrev) => {
clearInterval(timerId)
}, 300)
}
+//跳转票据页面
+const handleTicket = row => {
+ router.push({
+ path: '/billCollected',
+ query: row
+ })
+}
onMounted(() => {
ReceivablesList()
})
diff --git a/src/pages/receivables-management/billCollected.vue b/src/pages/receivables-management/billCollected.vue
new file mode 100644
index 0000000..e5bf965
--- /dev/null
+++ b/src/pages/receivables-management/billCollected.vue
@@ -0,0 +1,194 @@
+
+
+
+
+ 填写电子票据
+
+
+
+
+
+
+
diff --git a/src/router/modules/receivables-management.js b/src/router/modules/receivables-management.js
index f96f692..f6991c7 100644
--- a/src/router/modules/receivables-management.js
+++ b/src/router/modules/receivables-management.js
@@ -15,6 +15,12 @@ const ReceivablesManagement = [
title: "应收款管理",
},
},
+ {
+ path: "/billCollected",
+ name: "BillCollected",
+ component: () => import("@/pages/receivables-management/billCollected.vue"),
+ meta: { title: "票据收款", hidden: false },
+ }
],
},
];
From 220d9d4fd8d3420df180154b8ab176fe7d4fda9d Mon Sep 17 00:00:00 2001
From: sundongyu <2811054731@qq.com>
Date: Sun, 7 Apr 2024 22:15:44 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20feat:=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=BA=86=E5=8F=91=E7=A5=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/receivables-management/Bill.vue | 354 ++++++++++++++++++
.../receivables-management/billCollected.vue | 8 +-
src/router/modules/receivables-management.js | 6 +
3 files changed, 366 insertions(+), 2 deletions(-)
create mode 100644 src/pages/receivables-management/Bill.vue
diff --git a/src/pages/receivables-management/Bill.vue b/src/pages/receivables-management/Bill.vue
new file mode 100644
index 0000000..92c932d
--- /dev/null
+++ b/src/pages/receivables-management/Bill.vue
@@ -0,0 +1,354 @@
+
+
+
+
+
+
+
+ xxx增值税电子普通发票
+
+
+
+
+
+
+
+
缴费方
+
+
+ -
+ {{ InvoiceData.xname }}
+
+ -
+ {{ InvoiceData.xstudent }}
+
+ -
+
+
+ -
+
+
+
+
+
缴费方
+
+
+ -
+ {{ InvoiceData.xdepartment }}
+
+ -
+ {{ InvoiceData.xgrade }}
+
+
+
+
+
+
+
价税合计(大写)
+
+
+
+ (小写)
+ ¥
+
+
+
+
+
收费方
+
+
+ - xxxxxxx学院
+ -
+ 12443536377484848
+
+ -
+ 11223443532
+
+ - 中国农业银行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/receivables-management/billCollected.vue b/src/pages/receivables-management/billCollected.vue
index e5bf965..e6f4b67 100644
--- a/src/pages/receivables-management/billCollected.vue
+++ b/src/pages/receivables-management/billCollected.vue
@@ -22,11 +22,11 @@
import { ref, computed } from 'vue'
import { Input, Select } from 'tdesign-vue-next'
import { useRoute } from 'vue-router'
+import { useRouter } from 'vue-router'
import dayjs from 'dayjs'
const route = useRoute()
-console.log(route.query)
-
+const router = useRouter()
const initData = new Array(1).fill(null).map((_, i) => ({
key: String(i + 1),
//学生姓名
@@ -188,6 +188,10 @@ const columns = computed(() => [
}
])
const handleEdit = row => {
+ router.push({
+ path: 'bill-bill',
+ query: row
+ })
console.log(row)
}
diff --git a/src/router/modules/receivables-management.js b/src/router/modules/receivables-management.js
index f6991c7..29290d8 100644
--- a/src/router/modules/receivables-management.js
+++ b/src/router/modules/receivables-management.js
@@ -20,6 +20,12 @@ const ReceivablesManagement = [
name: "BillCollected",
component: () => import("@/pages/receivables-management/billCollected.vue"),
meta: { title: "票据收款", hidden: false },
+ },
+ {
+ path: "/bill-bill",
+ name: "BillBill",
+ component: () => import("@/pages/receivables-management/Bill.vue"),
+ meta: { title: "票据", hidden: false },
}
],
},