diff --git a/src/api/incomePaymentsApi.js b/src/api/incomePaymentsApi.js index 37218a2..f8f0216 100644 --- a/src/api/incomePaymentsApi.js +++ b/src/api/incomePaymentsApi.js @@ -154,6 +154,10 @@ const getStardsMemberProjectById = (params) => getAction('', params) const memberDrawTicket = (params) => getAction('', params) // 标协会员单位信息-复制 const memberCopy = (params) => getAction('', params) + +// 工作组成员维护-调账 +const workingGroupEditAccount = (param) => getAction('/project/payWorkingGroupSubitem/editAccount', param) + export { getWorkingGroupById, getChargeNotice, @@ -233,5 +237,7 @@ export { getStardsMemberProjectById, memberDrawTicket, - memberCopy + memberCopy, + + workingGroupEditAccount } diff --git a/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue b/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue index bfe9ca5..13a7a96 100644 --- a/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue +++ b/src/views/projectManagement/WorkingGroupMemberUnitMaintenance.vue @@ -180,6 +180,8 @@ + + 调账 编辑 删除 @@ -202,7 +204,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin' import JYearDate from '@comp/jero/JYearDate' import PageHeaderTitle from '@comp/layouts/PageHeaderTitle' -import { getWorkingGroupById, dunningReminder } from '@api/incomePaymentsApi' +import {getWorkingGroupById, dunningReminder, workingGroupEditAccount} from '@api/incomePaymentsApi' import StatusSlot from '../../components/tools/StatusSlot' import ProjectDetailModal from '../../components/ProjectDetailModal' import WorkingGroupMemberUnitModule from './modules/WorkingGroupMemberUnitModule' @@ -417,6 +419,36 @@ export default { }, methods: { formatMoney, + // 是否可以调账 + isAllowEditAccount (record) { + const { receivableAmount, mail, inAccount, makeInvoice } = record + // 待确收金额为0,已开票、已到账、已邮寄,满足其一不可以操作 + return (receivableAmount === '0.00') || (mail !== 0) || (inAccount !== 0) || (makeInvoice !== 0) + }, + // 调账 + handleEditAccount (record) { + this.$confirm({ + title: '确认调账', + content: '是否调账数据?', + onOk: () => { + this.loading = true + const params = { + companyId: record.id, + workGroupId: this.workingGroupProjectId + } + workingGroupEditAccount(params).then(res => { + if (res.success) { + this.$message.success(res.message) + this.modalFormOk() + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) + }, // 重写查询方法--删除预估到账日期属性 searchQuery() { this.lastQueryParam = {...this.queryParam}