diff --git a/api/model/workEntryInfo.js b/api/model/workEntryInfo.js index 9777903..c9fafd1 100644 --- a/api/model/workEntryInfo.js +++ b/api/model/workEntryInfo.js @@ -46,12 +46,18 @@ const api = { method: 'GET', auth: true, }, - //记工记账-全年收支 + //查询记工记录 notebookQueryWork: { url: '/employ/notebook/queryWork', method: 'GET', auth: true, }, + //查询全年收支统计 + notebookQueryBillAmount: { + url: '/employ/notebook/queryBillAmount', + method: 'GET', + auth: true, + }, } export default api \ No newline at end of file diff --git a/pages_order/kepp/AnnualExpenditure.vue b/pages_order/kepp/AnnualExpenditure.vue index 3ff31b7..1323009 100644 --- a/pages_order/kepp/AnnualExpenditure.vue +++ b/pages_order/kepp/AnnualExpenditure.vue @@ -3,17 +3,15 @@ - - + + {{ notebook.title }} - - + + 2024 @@ -21,7 +19,7 @@ 总收入(元) - ¥1223 + ¥{{ countNumber.incomeCount }} @@ -29,19 +27,24 @@ 总支出(元) - ¥1223 + ¥{{ countNumber.expenditureCount }} - + :title="bill.typeTitle[item.type]" + :value="`${bill.typeNo[item.type]}${item.amount}`"> + @@ -53,16 +56,53 @@ return { mixinsListApi : 'queryBill', apiType : '', - typeNo : ['+', '-'], + bill : { + typeNo : ['+', '-'], + typeTitle : ['收入', '支出'], + }, + countNumber : {}, + notebookList : [], + notebook : { + title : '选择项目', + }, } }, onLoad({apiType}) { this.apiType = apiType this.mixinsListApi += apiType || '' + this.getCommonQueryNotebookList() + }, + onShow() { + this.notebookQueryBillAmount() + }, + onPullDownRefresh() { + this.notebookQueryBillAmount() }, - onShow() {}, methods: { - + notebookQueryBillAmount(){ + this.$api('notebookQueryBillAmount', + this.queryParams, res => { + if(res.code == 200){ + this.countNumber = res.result + } + }) + }, + getCommonQueryNotebookList(){ + this.$api('commonQueryNotebookList', { + pageNo: 1, + pageSize: 9999999, + }, res => { + if(res.code == 200){ + this.notebookList = res.result.records + } + }) + }, + notebookListConfirm(e){ + this.notebook = e.value[0] + this.queryParams.notebookId = this.notebook.id + this.getData() + this.notebookQueryBillAmount() + }, } } diff --git a/pages_order/kepp/addWorkEntryRecords.vue b/pages_order/kepp/addWorkEntryRecords.vue index d95adc9..fda65e0 100644 --- a/pages_order/kepp/addWorkEntryRecords.vue +++ b/pages_order/kepp/addWorkEntryRecords.vue @@ -13,23 +13,19 @@ isLink > - + - - + --> - 加班时间 + 工作时间