diff --git a/src/api/accounting/book.js b/src/api/accounting/book.js new file mode 100644 index 00000000..ba63f6af --- /dev/null +++ b/src/api/accounting/book.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +// 创建会计账簿 +export function createAccountingBook(query,data) { + return request({ + url: '/archives/accounting-book/create', + method: 'post', + params: query, + data: data + }) +} + +// 更新会计账簿 +export function updateAccountingBook(data) { + return request({ + url: '/archives/accounting-book/update', + method: 'put', + data: data + }) +} + +// 删除会计账簿 +export function deleteAccountingBook(id) { + return request({ + url: '/archives/accounting-book/delete?id=' + id, + method: 'delete' + }) +} + +// 获得会计账簿 +export function getAccountingBook(id) { + return request({ + url: '/archives/accounting-book/get?id=' + id, + method: 'get' + }) +} + +// 获得会计账簿分页 +export function getAccountingBookPage(query) { + return request({ + url: '/archives/accounting-book/page', + method: 'get', + params: query + }) +} + +// 导出会计账簿 Excel +export function exportAccountingBookExcel(query) { + return request({ + url: '/archives/accounting-book/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/views/accounting/book/index.vue b/src/views/accounting/book/index.vue new file mode 100644 index 00000000..94dd1497 --- /dev/null +++ b/src/views/accounting/book/index.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/src/views/setting/passwords/index.vue b/src/views/setting/passwords/index.vue index 95809d4d..bdb6eae0 100644 --- a/src/views/setting/passwords/index.vue +++ b/src/views/setting/passwords/index.vue @@ -39,6 +39,17 @@ export default { }); }, submit() { + var pwdRegex = new RegExp("(?=.*[0-9])(?=.*[a-zA-Z])"); + if (this.passwords.length < 8 || this.passwords.length > 20) { + this.$modal.msgError("您的密码长度不符合!"); + return false; + } + if (!pwdRegex.test(this.passwords)) { + this.$modal.msgError( + "您的密码复杂度太低(密码中必须包含字母、数字),请及时修改密码!" + ); + return false; + } const data = this.passwords; createPasswords({ passwordValue: data }).then((response) => { this.$modal.msgSuccess("设置成功");