diff --git a/package.json b/package.json index 621d8de..c496ed7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "element-china-area-data": "^6.1.0", "html2canvas": "^1.4.1", "mammoth": "^1.9.0", "pdf-lib": "^1.17.1", diff --git a/pc/package.json b/pc/package.json index 491d5d5..a5c72a8 100644 --- a/pc/package.json +++ b/pc/package.json @@ -49,7 +49,10 @@ "vue-router": "3.4.9", "vuedraggable": "^2.24.3", "vuex": "3.6.0", - "xlsx": "^0.18.5" + "xlsx": "^0.18.5", + "element-china-area-data": "^6.1.0", + "mammoth": "^1.9.0", + "qrcode.vue": "^3.6.0" }, "devDependencies": { "@vue/cli-plugin-babel": "4.4.6", diff --git a/pc/src/api/finance.js b/pc/src/api/finance.js index 11a2f25..cd2ab71 100644 --- a/pc/src/api/finance.js +++ b/pc/src/api/finance.js @@ -416,7 +416,7 @@ export function uploadBillAttachment(billId, file) { formData.append('billId', billId) formData.append('file', file) return request({ - url: '/bill/attachment/upload', + url: '/bill/upload-attachment', method: 'post', data: formData, headers: { @@ -425,10 +425,11 @@ export function uploadBillAttachment(billId, file) { }) } +// 账单附件删除 export function deleteBillAttachment(attachmentId) { return request({ - url: `/bill/attachment/${attachmentId}`, - method: 'delete' + url: `/bill/attachment/delete/${attachmentId}`, + method: 'get' }) } @@ -446,4 +447,267 @@ export function exportBillList(data) { data, responseType: 'blob' }) +} + +// 收支流水相关接口 +export function getTransactionList(params) { + return request({ + url: '/finance/transaction/page', + method: 'get', + params + }) +} + +export function getTransactionDetail(id) { + return request({ + url: `/finance/transaction/${id}`, + method: 'get' + }) +} + +export function addTransaction(data) { + return request({ + url: '/finance/transaction', + method: 'post', + data + }) +} + +export function updateTransaction(data) { + return request({ + url: '/finance/transaction', + method: 'put', + data + }) +} + +export function exportTransactionList(params) { + return request({ + url: '/finance/transaction/export', + method: 'get', + params, + responseType: 'blob' + }) +} + +export function getTransactionAttachments(transactionId) { + return request({ + url: `/finance/transaction/${transactionId}`, + method: 'get' + }) +} + +export function uploadTransactionAttachment(transactionId, file) { + const formData = new FormData() + formData.append('transactionId', transactionId) + formData.append('userId', localStorage.getItem('userId') || '') + formData.append('userName', localStorage.getItem('userName') || '') + formData.append('file', file) + + return request({ + url: '/finance/transaction/attachment', + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +export function deleteTransactionAttachment(attachmentId) { + return request({ + url: `/finance/transaction/attachment/file/${attachmentId}`, + method: 'delete' + }) +} + +export function previewAttachment(attachmentId) { + return request({ + url: `/finance/transaction/attachment/preview/file/${attachmentId}`, + method: 'get', + responseType: 'blob' + }) +} + +export function previewAttachmentByFileId(fileId) { + return request({ + url: `/finance/transaction/attachment/preview/file/${fileId}`, + method: 'get', + responseType: 'blob' + }) +} + +export function downloadAttachment(fileId, fileName) { + return request({ + url: `/finance/transaction/attachment/download/${fileId}`, + method: 'get', + params: { fileName }, + responseType: 'blob' + }) +} + +export function deleteAttachmentByFileId(fileId) { + return request({ + url: `/finance/transaction/attachment/file/${fileId}`, + method: 'delete', + params: { + userId: localStorage.getItem('userId') || '' + } + }) +} + +export function addTransactionOperation(data) { + return request({ + url: '/finance/transaction/operation', + method: 'post', + data + }) +} + +export function getTransactionOperationLogs(transactionId, query) { + return request({ + url: `/finance/transaction/${transactionId}`, + method: 'get' + }) +} + +// 获取所有收支账户 +export function getAllFinanceAccounts() { + return request({ + url: '/finance/account/list', + method: 'get' + }) +} + +// 账单调整相关接口 + +// 添加账单调整(按金额或按比例) +export function addBillAdjustment(data) { + return request({ + url: '/v1/bill-adjustments', + method: 'post', + data + }) +} + +// 作废账单调整 +export function voidBillAdjustment(data) { + return request({ + url: '/v1/bill-adjustments/void', + method: 'put', + data + }) +} + +// 分页查询账单调整记录 +export function getBillAdjustmentList(params) { + return request({ + url: '/v1/bill-adjustments', + method: 'get', + params + }) +} + +// 获取账单调整详情 +export function getBillAdjustmentDetail(id) { + return request({ + url: `/v1/bill-adjustments/${id}`, + method: 'get' + }) +} + +// 上传账单调整附件 +export function uploadBillAdjustmentAttachment(id, file) { + const formData = new FormData() + formData.append('file', file) + return request({ + url: `/v1/bill-adjustments/${id}/attachments`, + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +// 删除账单调整附件 +export function deleteBillAdjustmentAttachment(attachmentId) { + return request({ + url: `/v1/bill-adjustments/attachments/${attachmentId}`, + method: 'delete' + }) +} + +// 获取账单明细 +export function getBillDetailById(detailId) { + return request({ + url: `/v1/bill-details/${detailId}`, + method: 'get' + }) +} + +// 获取账单调整附件列表 +export function getBillAdjustmentAttachmentList(adjustmentId) { + return request({ + url: `/v1/bill-adjustments/attachments/view/${adjustmentId}`, + method: 'get' + }) +} + +// 获取账单操作记录 +export function getBillOperationRecords(billId, params) { + return request({ + url: `/v1/operation-records/list/${billId}`, + method: 'get', + params + }) +} + +// 账单支付相关接口 +// 提交账单支付 +export function submitBillPayment(data) { + return request({ + url: '/v1/bill-payments', + method: 'post', + data + }) +} + +// 分页查询支付记录 +export function getBillPaymentRecords(params) { + return request({ + url: '/v1/bill-payments', + method: 'get', + params + }) +} + +// 获取支付详情 +export function getBillPaymentDetail(id) { + return request({ + url: `/v1/bill-payments/${id}`, + method: 'get' + }) +} + +// 上传支付附件 +export function uploadBillPaymentAttachment(id, file) { + const formData = new FormData() + formData.append('file', file) + return request({ + url: `/v1/bill-payments/${id}/attachments`, + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data' + } + }) +} + +// 删除支付附件 +export function deleteBillPaymentAttachment(attachmentId) { + return request({ + url: `/v1/bill-payments/attachments/${attachmentId}`, + method: 'delete' + }) } \ No newline at end of file diff --git a/pc/src/components/RegionSelector.vue b/pc/src/components/RegionSelector.vue new file mode 100644 index 0000000..2713270 --- /dev/null +++ b/pc/src/components/RegionSelector.vue @@ -0,0 +1,136 @@ + + + + + \ No newline at end of file diff --git a/pc/src/router/modules/finance.js b/pc/src/router/modules/finance.js index c20f28b..af16121 100644 --- a/pc/src/router/modules/finance.js +++ b/pc/src/router/modules/finance.js @@ -30,6 +30,12 @@ export default { component: () => import('@/views/finance/billList/index.vue'), name: 'BillList', meta: { title: '所有账单', icon: 'el-icon-notebook-2' } + }, + { + path: 'transaction', + component: () => import('@/views/finance/transaction/index.vue'), + name: 'Transaction', + meta: { title: '收支流水', icon: 'el-icon-money' } } ] } \ No newline at end of file diff --git a/pc/src/views/finance/billList/components/AddBill.vue b/pc/src/views/finance/billList/components/AddBill.vue index 8371e23..6ed1402 100644 --- a/pc/src/views/finance/billList/components/AddBill.vue +++ b/pc/src/views/finance/billList/components/AddBill.vue @@ -5,8 +5,8 @@ - 含税 - 不含税 + 含税 + 不含税 @@ -14,18 +14,18 @@ - 正常 - 罚金 + 正常 + 罚金 - - + + - - + + - - + + @@ -64,8 +64,8 @@ - - + @@ -75,12 +75,12 @@ - - + + - + + + + +
+
+ +
+
+ +
+
+ +

预览加载失败,请尝试下载后查看

+
+ 下载文件 +
+
+
+ +
@@ -755,4 +933,45 @@ export default { color: #F56C6C; } } + +.preview-container { + min-height: 500px; + max-height: 700px; + overflow: auto; + + .preview-iframe { + width: 100%; + height: 500px; + border: none; + } + + .preview-image { + display: flex; + justify-content: center; + align-items: center; + min-height: 300px; + } + + .preview-error { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 300px; + color: #909399; + + i { + font-size: 48px; + margin-bottom: 20px; + } + + p { + font-size: 16px; + } + + .preview-actions { + margin-top: 20px; + } + } +} \ No newline at end of file diff --git a/pc/src/views/finance/billList/components/BillDetail.vue b/pc/src/views/finance/billList/components/BillDetail.vue index cc56d22..06b5ee4 100644 --- a/pc/src/views/finance/billList/components/BillDetail.vue +++ b/pc/src/views/finance/billList/components/BillDetail.vue @@ -2,22 +2,35 @@
+
+
+

账单信息

+
+
+ + 账单支付 + +
+
- {{ billDetail.billNumber }} + {{ billDetail.totBillNo }} {{ getBillSourceName(billDetail.billSource) }} {{ billDetail.billStatus === '1' ? '开启' : '关闭' }} - {{ billDetail.payeeName }} + {{ billDetail.paysdName }} {{ billDetail.payeeContact }} {{ billDetail.contractNumber || '无' }} - {{ billDetail.feeTypeName }} + {{ billDetail.feTpName }} - {{ billDetail.billingStartDate }} 至 {{ billDetail.billingEndDate }} + {{ billDetail.chggBgnDt }} 至 {{ billDetail.chggEndDt }} - {{ billDetail.receivableDate }} + {{ billDetail.pybDt }} {{ getClearStatusName(billDetail.clearStatus) }} @@ -29,18 +42,18 @@ - - {{ getLateFeeStatusName(billDetail.lateFeeStatus) }} + + {{ getLateFeeStatusName(billDetail.ovdueStatus) }} - {{ formatAmount(billDetail.billAmount) }} - {{ formatAmount(billDetail.receivableAmount) }} - {{ formatAmount(billDetail.receivedAmount) }} + {{ formatAmount(billDetail.accblAmt) }} + {{ formatAmount(billDetail.accigRcvAmt) }} + {{ formatAmount(billDetail.atmRecvAmt) }} {{ formatAmount(billDetail.needAmount) }} - {{ formatAmount(billDetail.adjustAmount) }} - {{ formatAmount(billDetail.receivableLateFee) }} + {{ formatAmount(billDetail.adjAmt) }} + {{ formatAmount(billDetail.receivableOvdueAmt) }} {{ billDetail.taxRate }}% - {{ formatAmount(billDetail.taxAmount) }} + {{ formatAmount(billDetail.paybleTaxAmount) }} {{ billDetail.taxInclusiveRule }} {{ billDetail.specialBillType }} @@ -48,13 +61,121 @@ {{ billDetail.receiptStatus === '1' ? '已开据' : '未开据' }} - {{ billDetail.companyName }} + {{ billDetail.corNm }} {{ billDetail.rentArea }} ㎡ {{ billDetail.projectName }} {{ billDetail.billRemark || '无' }}
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+
+
+ @@ -69,7 +190,19 @@ - +
+ + 添加附件 +
只能上传jpg/png/pdf文件,且不超过5MB
+
+
+ @@ -77,6 +210,7 @@ @@ -87,21 +221,289 @@ - - - - + + +
+
+ + +
+ + + +
+
+ +
+
+ +
+
+ +

预览加载失败,请尝试下载后查看

+
+ 下载文件 +
+
+
+ +
+ + + + + + + 调增 + 调减 + + + + + + + + + + + 按金额调整 + 按比例调整 + + + + + + + 调整后金额: {{ formatAmount(adjustedAmount) }} + + + + + + 调整后金额: {{ formatAmount(adjustedAmount) }} + + + + + + + + + + 添加附件 +
只能上传jpg/png/pdf文件,且不超过5MB
+
+ + + + + + + +
+
+ +
+ + + + + + + + + + + +
+ +
+ +
+ + + + + +
+

账单状态

+ + + + {{ getClearStatusName(billDetail.clearStatus) }} + + + +
+ + +
+

费用信息

+ + {{ billDetail.feTpName }} + {{ formatAmount(billDetail.accigRcvAmt) }} + {{ formatAmount(billDetail.atmRecvAmt) }} + {{ formatAmount(billDetail.needAmount) }} + + + +
+ + + 收完 +
+
+ + + {{ formatAmount(remainingAmount) }} + + + + + + +
+ + +
+

支付方式

+ + + + + + + + + + + + + + + + + + + +
+ + +
+

附件信息

+
+ + 添加附件 +
只能上传jpg/png/pdf文件,且不超过5MB
+
+
+ + + + + + + +
+
+ +
\ No newline at end of file diff --git a/pc/src/views/finance/billList/index.vue b/pc/src/views/finance/billList/index.vue index 4a9bbef..9eb4dba 100644 --- a/pc/src/views/finance/billList/index.vue +++ b/pc/src/views/finance/billList/index.vue @@ -2,17 +2,17 @@
- - + + - - + + - - + + @@ -20,7 +20,7 @@ - + - + - - + + - - + + - + - + - - - + + +