diff --git a/src/views/business/businesscontract-add-or-update.vue b/src/views/business/businesscontract-add-or-update.vue index 6a43a12..7544082 100644 --- a/src/views/business/businesscontract-add-or-update.vue +++ b/src/views/business/businesscontract-add-or-update.vue @@ -9,16 +9,125 @@ + + +
- + + + + + + + + +
-
二、导入导出
+ +
二、属性定义
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
三、导入导出
@@ -39,154 +148,66 @@
-
三、属性定义
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
四、进项发票
- 1、相关描述
- - 2、相关照片
- + + + + + + + + + + + + - - - -
五、送审进度
+ + + +
四、送审进度
- - + + - - - + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + - - - + + + - - - + + + + + + + + + + + + + + + - - - + + + - + @@ -351,7 +366,7 @@
基本信息
合同名称 合同金额 合同签订时间 付款比例 验收时间
建设单位 - - - -
施工单位 - - 合同开工时间 合同竣工时间 实际开工时间 实际竣工时间
监理单位 - -
一审单位 - - 一审填报一审提报 一审减值 一审定值 一审定值确定时间
二审单位 - - 二审填报二审提报 二审减值 二审定值 二审定值确定时间
备注
提报与审计跟踪记录
记录送审、份数、时间、盖章、涉及人员等时间进程:
- +
@@ -402,7 +417,9 @@ :data="dataList" border v-loading="dataListLoading" + @selection-change="handleSelectionChange" style="width: 100%;"> + - - - + label="施工年份" + width="120"> + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + - 确定 - 取消 + 确定 + 取消 + - - - + label="施工年份" + width="120"> + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 确定 - 取消 + 确定 + 取消 @@ -598,6 +617,8 @@ export default { data () { return { + isChecked: [], + ids: [], id: '', visible: false, dataListLoading: false, @@ -623,6 +644,8 @@ id: 0, contractName: '', contractNewName: '', + excelContractMoney: '', + excelContractMoneyNew: '', contractJsdwId: '', contractYear: '', contractLxId: '', @@ -642,6 +665,8 @@ id: '', contractName: '', contractNewName: '', + excelContractMoney: '', + excelContractMoneyNew: '', contractJsdwId: '', contractYear: '', contractLxId: '', @@ -672,6 +697,7 @@ contractEsdw: '', contractEsdwId: '', excelContractMoney: '', + excelContractMoneyNew: '', excelContractQdtime: '', excelFkbl: '', excelYsbl: '', @@ -705,6 +731,7 @@ contractEsdwId: '', contractEsdw: '', excelContractMoney: '', + excelContractMoneyNew: '', excelContractQdtime: '', excelFkbl: '', excelYsbl: '', @@ -727,8 +754,29 @@ contractName: [ { required: true, message: '合同名称不能为空', trigger: 'blur' } ], + excelContractMoney: [ + { required: true, message: '合同金额不能为空', trigger: 'blur' } + ], contractYear: [ { required: true, message: '年份不能为空', trigger: 'blur' } + ], + contractJsdwId: [ + { required: true, message: '建设单位不能为空', trigger: 'blur' } + ], + contractSgdwId: [ + { required: true, message: '施工单位不能为空', trigger: 'blur' } + ], + contractZfyId: [ + { required: true, message: '直非友不能为空', trigger: 'blur' } + ], + contractJldwId: [ + { required: true, message: '监理单位不能为空', trigger: 'blur' } + ], + contractYsdwId: [ + { required: true, message: '一审单位不能为空', trigger: 'blur' } + ], + contractEsdwId: [ + { required: true, message: '二审单位不能为空', trigger: 'blur' } ] } } @@ -750,6 +798,13 @@ if (data && data.code === 0) { this.dataForm.contractName = data.businessContract.contractName this.dataForm.contractNewName = data.businessContract.contractNewName + this.dataForm.excelContractMoney = data.businessContract.excelContractMoney + this.dataForm.excelContractMoneyNew = data.businessContract.excelContractMoneyNew + if(data.businessContract.excelContractMoneyNew){ + this.dataExcelForm.excelContractMoney = data.businessContract.excelContractMoneyNew + } else { + this.dataExcelForm.excelContractMoney = data.businessContract.excelContractMoney + } this.dataForm.contractJsdwId = data.businessContract.contractJsdwId this.dataForm.contractYear = data.businessContract.contractYear this.dataForm.contractLxId = data.businessContract.contractLxId @@ -767,14 +822,15 @@ this.dataForm.createName = data.businessContract.createName this.dataForm.approval = data.businessContract.approval this.dataForm.isTotal = data.businessContract.isTotal - if (this.dataForm.contractJxfpPhoto) { - this.$http.request({ - url: this.$http.adornUrl('/sys/oss/list?filePath=' + this.dataForm.contractJxfpPhoto), - method: 'get' - }).then(({data}) => { - this.imageUrl = data.replace(/[\r\n]/g, '') - }) - } + this.dataForm.projectId = data.businessContract.projectId + // if (this.dataForm.contractJxfpPhoto) { + // this.$http.request({ + // url: this.$http.adornUrl('/sys/oss/list?filePath=' + this.dataForm.contractJxfpPhoto), + // method: 'get' + // }).then(({data}) => { + // this.imageUrl = data.replace(/[\r\n]/g, '') + // }) + // } if (num === 1) { this.dataOldForm = { ...data.businessContract @@ -787,7 +843,6 @@ url: this.$http.adornUrl('/business/businessssjdexcel/contractInfo/' + id), method: 'get' }).then(({data}) => { - console.log(data) if (data && data.code === 0) { this.dataExcelForm = { ...this.dataForm @@ -820,6 +875,8 @@ 'id': this.dataForm.id || undefined, 'contractName': this.dataForm.contractName, 'contractNewName': this.dataForm.contractNewName, + 'excelContractMoney': this.dataForm.excelContractMoney, + 'excelContractMoneyNew': this.dataForm.excelContractMoneyNew, 'contractJsdwId': this.dataForm.contractJsdwId, 'contractYear': this.dataForm.contractYear, 'contractLxId': this.dataForm.contractLxId, @@ -835,7 +892,8 @@ 'updateTime': this.dataForm.updateTime, 'createName': this.dataForm.createName, 'approval': this.dataForm.approval, - 'isTotal': this.dataForm.isTotal + 'isTotal': this.dataForm.isTotal, + 'projectId': this.dataForm.projectId }) }).then(({data}) => { if (data && data.code === 0) { @@ -855,7 +913,102 @@ } }) } else { - if (this.approval !== 1 && (JSON.stringify(this.dataForm) !== JSON.stringify(this.dataOldForm) || JSON.stringify(this.dataOldExcelForm) !== JSON.stringify(this.dataExcelForm))) { + // if (this.approval !== 1 && (JSON.stringify(this.dataForm) !== JSON.stringify(this.dataOldForm) || JSON.stringify(this.dataOldExcelForm) !== JSON.stringify(this.dataExcelForm))) { + // if (this.dataForm.contractNewName !== '' && this.dataForm.contractNewName !== null && this.dataForm.contractNewName !== undefined) { + // this.$http.request({ + // url: this.$http.adornUrl('/business/businessapproval/save'), + // method: 'post', + // data: this.$http.adornData({ + // 'approvalId': this.dataForm.id, + // 'approvalName': this.dataForm.contractNewName, + // 'approvalData': JSON.stringify(this.dataForm), + // 'approvalOldData': JSON.stringify(this.dataOldForm), + // 'approvalSonData': JSON.stringify(this.dataExcelForm), + // 'approvalSonOldData': JSON.stringify(this.dataOldExcelForm), + // 'approvalType': 4, + // 'approvalSuccess': 0 + // }) + // }).then(({data}) => { + // if (data && data.code === 0) { + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => { + // this.visible = false + // this.$emit('refreshDataList') + // } + // }) + // } else { + // this.$message.error(data.msg) + // } + // }) + // } else { + // this.$refs['dataForm'].validate((valid) => { + // if (valid) { + // this.$http.request({ + // url: this.$http.adornUrl('/business/businessapproval/save'), + // method: 'post', + // data: this.$http.adornData({ + // 'approvalId': this.dataForm.id, + // 'approvalName': this.dataForm.contractName, + // 'approvalData': JSON.stringify(this.dataForm), + // 'approvalOldData': JSON.stringify(this.dataOldForm), + // 'approvalSonData': JSON.stringify(this.dataExcelForm), + // 'approvalSonOldData': JSON.stringify(this.dataOldExcelForm), + // 'approvalType': 4, + // 'approvalSuccess': 0 + // }) + // }).then(({data}) => { + // if (data && data.code === 0) { + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => { + // this.visible = false + // this.$emit('refreshDataList') + // } + // }) + // } else { + // this.$message.error(data.msg) + // } + // }) + // } + // }) + // } + // this.$refs['dataForm'].validate((valid) => { + // if (valid) { + // this.$http({ + // url: this.$http.adornUrl(`/business/businesscontract/update`), + // method: 'post', + // data: this.$http.adornData({ + // 'id': this.dataForm.id, + // 'approval': 1 + // }) + // }).then(({data}) => { + // if (data && data.code === 0) { + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => { + // this.visible = false + // this.$emit('refreshDataList') + // } + // }) + // } else { + // this.$message.error(data.msg) + // } + // }) + // } + // }) + // } else if (this.approval === 1) { + // this.$message('请等待上次申请通过后再次申请') + // } else if (this.approval !== 1 && JSON.stringify(this.dataOldForm) === JSON.stringify(this.dataForm) && JSON.stringify(this.dataExcelForm) === JSON.stringify(this.dataOldExcelForm)) { + // this.$message('没有信息修改,请修改后申请') + // } + if (JSON.stringify(this.dataOldExcelForm) !== JSON.stringify(this.dataExcelForm)) { if (this.dataForm.contractNewName !== '' && this.dataForm.contractNewName !== null && this.dataForm.contractNewName !== undefined) { this.$http.request({ url: this.$http.adornUrl('/business/businessapproval/save'), @@ -870,63 +1023,85 @@ 'approvalType': 4, 'approvalSuccess': 0 }) - }).then(({data}) => { - if (data && data.code === 0) { - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - this.visible = false - this.$emit('refreshDataList') - } - }) - } else { - this.$message.error(data.msg) - } - }) + }).then(({data}) => {}) } else { - this.$refs['dataForm'].validate((valid) => { - if (valid) { - this.$http.request({ - url: this.$http.adornUrl('/business/businessapproval/save'), - method: 'post', - data: this.$http.adornData({ - 'approvalId': this.dataForm.id, - 'approvalName': this.dataForm.contractName, - 'approvalData': JSON.stringify(this.dataForm), - 'approvalOldData': JSON.stringify(this.dataOldForm), - 'approvalSonData': JSON.stringify(this.dataExcelForm), - 'approvalSonOldData': JSON.stringify(this.dataOldExcelForm), - 'approvalType': 4, - 'approvalSuccess': 0 - }) - }).then(({data}) => { - if (data && data.code === 0) { - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - this.visible = false - this.$emit('refreshDataList') - } - }) - } else { - this.$message.error(data.msg) - } - }) - } - }) + this.$http.request({ + url: this.$http.adornUrl('/business/businessapproval/save'), + method: 'post', + data: this.$http.adornData({ + 'approvalId': this.dataForm.id, + 'approvalName': this.dataForm.contractName, + 'approvalData': JSON.stringify(this.dataForm), + 'approvalOldData': JSON.stringify(this.dataOldForm), + 'approvalSonData': JSON.stringify(this.dataExcelForm), + 'approvalSonOldData': JSON.stringify(this.dataOldExcelForm), + 'approvalType': 4, + 'approvalSuccess': 0 + }) + }).then(({data}) => {}) } this.$refs['dataForm'].validate((valid) => { if (valid) { this.$http({ - url: this.$http.adornUrl(`/business/businesscontract/update'}`), + url: this.$http.adornUrl(`/business/businesscontract/update`), method: 'post', data: this.$http.adornData({ 'id': this.dataForm.id, - 'approval': 1 + 'approval': 0 + }) + }).then(({data}) => { + if (data && data.code === 0) { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + } else { + this.$message.error(data.msg) + } + }) + } + }) + } else { + if (this.dataForm.contractNewName !== '' && this.dataForm.contractNewName !== null && this.dataForm.contractNewName !== undefined) { + this.$http.request({ + url: this.$http.adornUrl('/business/businessapproval/save'), + method: 'post', + data: this.$http.adornData({ + 'approvalId': this.dataForm.id, + 'approvalName': this.dataForm.contractNewName, + 'approvalData': JSON.stringify(this.dataForm), + 'approvalOldData': JSON.stringify(this.dataOldForm), + 'approvalType': 4, + 'approvalSuccess': 0 + }) + }).then(({data}) => {}) + } else { + this.$http.request({ + url: this.$http.adornUrl('/business/businessapproval/save'), + method: 'post', + data: this.$http.adornData({ + 'approvalId': this.dataForm.id, + 'approvalName': this.dataForm.contractName, + 'approvalData': JSON.stringify(this.dataForm), + 'approvalOldData': JSON.stringify(this.dataOldForm), + 'approvalType': 4, + 'approvalSuccess': 0 + }) + }).then(({data}) => {}) + } + this.$refs['dataForm'].validate((valid) => { + if (valid) { + this.$http({ + url: this.$http.adornUrl(`/business/businesscontract/update`), + method: 'post', + data: this.$http.adornData({ + 'id': this.dataForm.id, + 'approval': 0 }) }).then(({data}) => { if (data && data.code === 0) { @@ -945,10 +1120,6 @@ }) } }) - } else if (this.approval === 1) { - this.$message('请等待上次申请通过后再次申请') - } else if (this.approval !== 1 && JSON.stringify(this.dataOldForm) === JSON.stringify(this.dataForm) && JSON.stringify(this.dataExcelForm) === JSON.stringify(this.dataOldExcelForm)) { - this.$message('没有信息修改,请修改后申请') } } }, @@ -959,15 +1130,24 @@ }, // 删除项目 deleteProject () { + console.log(this.dataForm.projectId) this.deleteLxId = true this.dataList = [] + let projectId = '-1' + if (this.dataForm.projectId !== '' && this.dataForm.projectId !== null && this.dataForm.projectId !== undefined) { + projectId = this.dataForm.projectId + } this.$http.request({ - url: this.$http.adornUrl('/business/businesscontract/projectList/' + this.dataForm.projectId), + url: this.$http.adornUrl('/business/businesscontract/projectList/' + projectId), method: 'get' }).then(({data}) => { - // console.log(data); if (data && data.code === 0) { - this.dataList = data.page + data.page.forEach((item) => { + if (item.projectNewName !== null) { + item.project = item.projectNewName + } + this.dataList.push(item) + }) } }) }, @@ -983,40 +1163,39 @@ this.getselectProject() }, // 选择立项 - chooseProject (project) { - if (this.dataForm.projectId === undefined) { - this.dataForm.projectId = project.projectId - } else { - let newProjectIds = '' - let flag = 0 // 判断有没有标志 - if (!this.dataForm.projectId.toString().includes(',')) { // 说明字段里面没有第二个立项 - if (this.dataForm.projectId !== project.projectId) { - this.dataForm.projectId += ',' + project.projectId - } else { - this.dataForm.projectId = '' - } - } else { - this.dataForm.projectId.split(',').forEach((item) => { - // 不含有则添加新数组里 - if (item !== project.projectId.toString()) { - if (newProjectIds === '') { - newProjectIds = item - } else { - newProjectIds += ',' + item - } - } else { - flag = 1 // 说明有 - } - }) - if (flag === 0) { // 说明选择的立项不在字段中 - newProjectIds += ',' + project.projectId - } - this.dataForm.projectId = newProjectIds - } - } - this.newProjectId = this.dataForm.projectId - console.log(this.dataForm.projectId) - }, + // chooseProject (project) { + // if (this.dataForm.projectId === undefined) { + // this.dataForm.projectId = project.projectId + // } else { + // let newProjectIds = '' + // let flag = 0 // 判断有没有标志 + // if (!this.dataForm.projectId.toString().includes(',')) { // 说明字段里面没有第二个立项 + // if (this.dataForm.projectId !== project.projectId) { + // this.dataForm.projectId += ',' + project.projectId + // } else { + // this.dataForm.projectId = '' + // } + // } else { + // this.dataForm.projectId.split(',').forEach((item) => { + // // 不含有则添加新数组里 + // if (item !== project.projectId.toString()) { + // if (newProjectIds === '') { + // newProjectIds = item + // } else { + // newProjectIds += ',' + item + // } + // } else { + // flag = 1 // 说明有 + // } + // }) + // if (flag === 0) { // 说明选择的立项不在字段中 + // newProjectIds += ',' + project.projectId + // } + // this.dataForm.projectId = newProjectIds + // } + // } + // this.newProjectId = this.dataForm.projectId + // }, // 从选择的立项数组中移除 delProject (project) { let newProjectIds = '' @@ -1032,7 +1211,6 @@ } } else { // 先判断 数组中含不含有此立项id - console.log(this.newProjectId.includes(project.projectId.toString())) if (this.newProjectId.includes(project.projectId.toString())) { // 说明含有移除此立项 this.newProjectId.split(',').forEach((item) => { if (item !== project.projectId.toString()) { // 不想等放入中间数组 @@ -1048,7 +1226,6 @@ this.newProjectId += ',' + project.projectId } } - console.log(this.newProjectId) }, // 图片上传成功的回调 handleImageSuccess (res, file) { @@ -1062,31 +1239,59 @@ this.dataListLoading = true this.dataList = [] this.$http.request({ - url: this.$http.adornUrl('/business/businessplan/projectList'), + url: this.$http.adornUrl('/business/businesscontract/projectList'), method: 'get', params: this.$http.adornParams({ - 'page': this.pageIndex, - 'projectJsdwId': this.dataForm.projectJsdwId, - 'projectYear': this.dataForm.projectYear, - 'projectSgddId': this.dataForm.projectSgddId, - 'projectGclbId': this.dataForm.projectGclbId, - 'projectSgjdId': this.dataForm.projectSgjdId, - 'isContant': this.dataForm.isContant, - 'gjz': this.dataForm.gjz, - 'limit': this.pageSize + 'isContant': 0, + 'projectJsdwId': this.dataForm.contractJsdwId }) }).then(({data}) => { if (data && data.code === 0) { - data.page.list.forEach((item) => { - if (item.projectNewName !== null) { - item.project = item.projectNewName - } - this.dataList.push(item) + let proIds = this.dataForm.projectId.split(',') + let ids_dict = {} + proIds.forEach((item) => { + ids_dict[item] = item + }) + data.page.forEach((item) => { + if (ids_dict[item.projectId]) { + } else { + if (item.projectNewName !== null) { + item.project = item.projectNewName + } + this.dataList.push(item) + } }) - this.totalPage = data.page.totalCount } }) this.dataListLoading = false + }, + handleSelectionChange (val) { + let selectedIds = val.map((item) => item.projectId.toString()) + this.dataForm.projectId.split(',').forEach((item) => { + let beal = selectedIds.includes(item) + if(!beal){ + selectedIds.push(item) + } + }) + this.ids = selectedIds + }, + submitSelectLxId () { + this.dataForm.projectId = this.ids.join(',') + this.selectLxId = false + }, + handleSelectionChangeDel (val) { + this.ids = this.dataForm.projectId.split(',') + let selectedIds = val.map((item) => item.projectId.toString()) + selectedIds.forEach((id) => { + this.ids = this.ids.filter(function(item) { + return item !== id + }) + }) + console.log(this.ids) + }, + submitDeleteLxId () { + this.dataForm.projectId = this.ids.join(',') + this.deleteLxId = false } }, mounted () { @@ -1164,4 +1369,15 @@ resize: none;/* 这个是去掉 textarea 下面拉伸的那个标志,如下图 */ } +.bgColor { + background-color: #19be6b; + color: black; + width: 90%; + height: 70%; + display: flex; + justify-content: center; + align-items: center; +} + + diff --git a/src/views/business/businesscontract.vue b/src/views/business/businesscontract.vue index 180d1c2..de89e6b 100644 --- a/src/views/business/businesscontract.vue +++ b/src/views/business/businesscontract.vue @@ -122,7 +122,16 @@ }) }).then(({data}) => { if (data && data.code === 0) { - this.dataList = data.page.list + this.dataList = [] + data.page.list.forEach((item) => { + if (item.contractNewName !== null && item.contractNewName !== '') { + item.contractName = item.contractNewName + } + if (item.excelContractMoneyNew !== null && item.contractNewName !== '') { + item.excelContractMoney = item.excelContractMoneyNew + } + this.dataList.push(item) + }) this.totalPage = data.page.totalCount } else { this.dataList = [] diff --git a/src/views/business/businessoutin.vue b/src/views/business/businessoutin.vue index b8af3be..daea403 100644 --- a/src/views/business/businessoutin.vue +++ b/src/views/business/businessoutin.vue @@ -1,8 +1,8 @@ - - - - - - + + + + + + + + + + + + + + + + + + - +
@@ -160,7 +161,8 @@ addOrUpdateVisible: false, userId: '', authenticName: '', - sysYear: '' + sysYear: '', + isShow: false } }, components: { @@ -180,6 +182,9 @@ if (data && data.code === 0) { this.userId = data.user.userId this.authenticName = data.user.authenticName + if (data.user.userId === 10 || data.user.userId === 1) { + this.isShow = true + } } }) await this.$http.request({ @@ -229,18 +234,21 @@ params: this.$http.adornParams({ 'start': this.dataForm.start, 'end': this.dataForm.end, - 'writeUserId': this.userId + 'writeUserId': this.userId, + 'page': this.pageIndex, + 'limit': this.pageSize }) }).then(({data}) => { + this.totalPage = data.page.totalCount if (this.authenticName === '管理员') { - this.dataList = data.page + this.dataList = data.page.list this.recipientList.forEach((item) => { if (item.dictId.toString() === item.outPayee) { item.outPayee = item.name } }) } else { - data.page.forEach((item) => { + data.page.list.forEach((item) => { if (item.writeUserId === this.userId) { // 谁登陆查找谁的信息 this.recipientList.forEach((item) => { if (item.dictId.toString() === item.outPayee) { @@ -254,8 +262,12 @@ }) this.dataListLoading = false }, - onExport() { - window.open(this.$http.adornUrl('/business/businessoutlay/export')); + onExport () { + if (this.authenticName === '管理员') { + window.open(this.$http.adornUrl('/business/businessoutlay/export')) + } else { + window.open(this.$http.adornUrl('/business/businessoutlay/export?writeUserId=' + this.userId)) + } }, // 每页数 sizeChangeHandle (val) { diff --git a/src/views/business/businessoutlayincome-add-or-update.vue b/src/views/business/businessoutlayincome-add-or-update.vue index b92425a..f3872e3 100644 --- a/src/views/business/businessoutlayincome-add-or-update.vue +++ b/src/views/business/businessoutlayincome-add-or-update.vue @@ -14,17 +14,17 @@ - + - + - + - - 计算 + + + + + + + @@ -64,7 +78,7 @@ outinTdayOut: '', outinTdayBalance: '', outinCreditingWay: '', - outinPayId: '', + outType: '', outinRemark: '', status: 0, writeUserId: '', // 填写人id @@ -78,7 +92,7 @@ outinTdayOut: '', outinTdayBalance: '', outinCreditingWay: '', - outinPayId: '', + outType: '', outinRemark: '', status: 0, writeUserId: '', // 填写人id @@ -88,6 +102,7 @@ authenticName: '', // 字典内容 payList: [], + expenseList: [], // 收入类别 dataRule: { outinDate: [ { required: true, message: '日期不能为空', trigger: 'blur' } @@ -181,32 +196,35 @@ if (item.dictCode === 'pay_type') { this.payList = item.children } + if (item.dictCode === 'expense_type') { + this.expenseList = item.children + } }) } }) }) }, - jrYe(){ - let v1 = this.dataForm.outinYdayBalance; - if(!v1) { - v1 = 0; + jrYe () { + let v1 = this.dataForm.outinYdayBalance + if (!v1) { + v1 = 0 } else { - v1 = parseFloat(this.dataForm.outinYdayBalance); + v1 = parseFloat(this.dataForm.outinYdayBalance) } - let v2 = this.dataForm.outinTdayIncome; - if(!v2) { - v2 = 0; + let v2 = this.dataForm.outinTdayIncome + if (!v2) { + v2 = 0 } else { v2 = parseFloat(this.dataForm.outinTdayIncome) } - let v3 = this.dataForm.outinTdayOut; - if(!v3) { - v3 = 0; + let v3 = this.dataForm.outinTdayOut + if (!v3) { + v3 = 0 } else { v3 = parseFloat(this.dataForm.outinTdayOut) } - this.dataForm.outinTdayBalance = (v1 + v2 - v3).toFixed(2); - this.$forceUpdate(); + this.dataForm.outinTdayBalance = (v1 + v2 - v3).toFixed(2) + this.$forceUpdate() }, bindChange: function (e) { @@ -325,11 +343,11 @@ 'outinTdayOut': this.dataForm.outinTdayOut, 'outinTdayBalance': this.dataForm.outinTdayBalance, 'outinCreditingWay': this.dataForm.outinCreditingWay, - 'outinPayId': this.dataForm.outinPayId, 'outinRemark': this.dataForm.outinRemark, - 'status': this.dataForm.status, + 'outType': this.dataForm.outType, + 'status': 0, 'writeUserId': this.dataForm.writeUserId, - 'approval': this.dataForm.approval + 'approval': 0 }) }).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/business/businessoutlayincome.vue b/src/views/business/businessoutlayincome.vue index f73ad5f..0db9b58 100644 --- a/src/views/business/businessoutlayincome.vue +++ b/src/views/business/businessoutlayincome.vue @@ -78,6 +78,17 @@ + + + - +
@@ -127,6 +138,7 @@ dataListLoading: false, dataListSelections: [], payList: [], // 收款方式 + expenseList: [], // 收入类别 addOrUpdateVisible: false, userId: '', authenticName: '', @@ -161,6 +173,9 @@ if (item.dictCode === 'pay_type') { this.payList = item.children } + if (item.dictCode === 'expense_type') { + this.expenseList = item.children + } }) } }) @@ -194,18 +209,21 @@ })*/ this.dataList = [] this.$http({ - url: this.$http.adornUrl('/business/businessoutlayincome/listNoPage'), + url: this.$http.adornUrl('/business/businessoutlayincome/pcListPage'), method: 'get', params: this.$http.adornParams({ 'start': this.dataForm.start, 'end': this.dataForm.end, - 'writeUserId': this.userId + 'writeUserId': this.userId, + 'page': this.pageIndex, + 'limit': this.pageSize }) }).then(({data}) => { + this.totalPage = data.page.totalCount if (this.authenticName === '管理员') { - this.dataList = data.page + this.dataList = data.page.list } else { - data.page.forEach((item) => { + data.page.list.forEach((item) => { if (item.writeUserId === this.userId) { // 谁登陆查找谁的信息 this.dataList.push(item) } @@ -214,8 +232,12 @@ }) this.dataListLoading = false }, - onExport() { - window.open(this.$http.adornUrl('/business/businessoutlayincome/export')); + onExport () { + if (this.authenticName === '管理员') { + window.open(this.$http.adornUrl('/business/businessoutlayincome/export')) + } else { + window.open(this.$http.adornUrl('/business/businessoutlayincome/export?writeUserId=' + this.userId)) + } }, // 每页数 sizeChangeHandle (val) {