From 20f938ab135538c5eef72e00eb36e8f625e2046c Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Tue, 14 Dec 2021 19:13:32 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E5=B7=A5=E4=BD=9C=E7=BB=84=E5=9C=A8?= =?UTF-8?q?=E7=A0=94=E9=A1=B9=E7=9B=AE=EF=BC=8C=E6=94=B6=E5=85=A5=E5=90=88?= =?UTF-8?q?=E5=90=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/incomePaymentsApi.js | 5 +- .../businessManagement/ContactManagement.vue | 6 ++ .../revenueContract/RevenueContractList.vue | 33 +++++++++- .../modules/AssociatedProject.vue | 13 ++-- .../modules/RevenueContractDetail.vue | 12 ++-- .../modules/RevenueContractModule.vue | 43 ++++++++++--- .../WorkingGroupProjectManagement.vue | 3 +- .../WorkingGroupUnderStudyProject.vue | 60 +++++++++++++++++-- .../WorkingGroupUnderStudyProjectModal.vue | 43 ++++++++----- 9 files changed, 173 insertions(+), 45 deletions(-) diff --git a/src/api/incomePaymentsApi.js b/src/api/incomePaymentsApi.js index 12edf59..d3876d0 100644 --- a/src/api/incomePaymentsApi.js +++ b/src/api/incomePaymentsApi.js @@ -91,6 +91,8 @@ const getPrintPostContactByMailId = (param) => getAction('/mail/payMailBill/prin // 全所统计--通过部门code查所有人员 const getUserByDepartCode = (param) => getAction('/statistics/allProjectStatistics/listForUserByOrgCode', param) +// 收入合同--作废 +const cancellationContract = (param) => postAction('/contract/payIncomeContract/cancellation', param) export { getWorkingGroupById, @@ -137,5 +139,6 @@ export { archiveExpenditureContract, getAllRevenueContract, getPrintPostContactByMailId, - getUserByDepartCode + getUserByDepartCode, + cancellationContract } diff --git a/src/views/businessManagement/ContactManagement.vue b/src/views/businessManagement/ContactManagement.vue index a116695..0ce35ac 100644 --- a/src/views/businessManagement/ContactManagement.vue +++ b/src/views/businessManagement/ContactManagement.vue @@ -142,9 +142,15 @@ export default { align: 'center', width: 140, dataIndex: 'phone' + },{ + title: '角色', + align: 'center', + width: 140, + dataIndex: 'roleCode_dictText' }, { title: '创建时间', align: 'center', + width: 150, dataIndex: 'createTime' }, { title: '企业名称', diff --git a/src/views/contractManagement/revenueContract/RevenueContractList.vue b/src/views/contractManagement/revenueContract/RevenueContractList.vue index 3b25682..7e1fc8d 100644 --- a/src/views/contractManagement/revenueContract/RevenueContractList.vue +++ b/src/views/contractManagement/revenueContract/RevenueContractList.vue @@ -139,7 +139,7 @@ v-has="'revenueContract:delete'">删除 已存档 - 报废 + 作废 @@ -155,7 +155,7 @@ import { JeroListMixin } from '../../../mixins/JeroListMixin' import RevenueContractAduitModule from './modules/RevenueContractAduitModule' import JDate from '../../../components/tools/JDate' import { RangeDateMixin } from '../../../mixins/RangeDateMixin' -import { archiveRevenueContract } from '../../../api/incomePaymentsApi' +import { archiveRevenueContract, cancellationContract } from '../../../api/incomePaymentsApi' import JYearDate from '../../../components/jero/JYearDate' export default { @@ -351,6 +351,35 @@ export default { } else { this.isPackage = false } + }, + /** + * 合同作废 + * @param record + */ + handleCancellation(record) { + let that = this + this.$confirm({ + title: '作废', + content: '确认作废?', + onOk: function () { + that.loading = true + that.loading = false + let param = { + contractId: record.id + } + cancellationContract(param).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + that.onClearSelected() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.loading = false + }) + } + }) } } } diff --git a/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue b/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue index d2755cb..e93f608 100644 --- a/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue +++ b/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue @@ -1,5 +1,5 @@ @@ -113,7 +115,7 @@ export default { } ], associatedProjectDataSource: [], - associatedProjectLoading: false, // 关联项目表格加载 + associatedProjectLoading: false // 关联项目表格加载 } }, computed: { @@ -162,6 +164,9 @@ export default { * 获取关联项目列表 */ loadAssociatedProject() { + if (!this.contractId || this.contractId === '') { + return + } const param = { contractId: this.contractId } @@ -191,7 +196,7 @@ export default { this.associatedProjectLoading = true const param = { id: this.contractId, - status: 2 + status: 3 } submitAudit(param).then(res => { if (res.success) { diff --git a/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue b/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue index 80c5f6c..49c9103 100644 --- a/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue +++ b/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue @@ -180,17 +180,10 @@ 编辑 - - 审核 - { if (res.success) { this.detailData = res.result diff --git a/src/views/contractManagement/revenueContract/modules/RevenueContractModule.vue b/src/views/contractManagement/revenueContract/modules/RevenueContractModule.vue index 54c3b6c..e08fd13 100644 --- a/src/views/contractManagement/revenueContract/modules/RevenueContractModule.vue +++ b/src/views/contractManagement/revenueContract/modules/RevenueContractModule.vue @@ -15,7 +15,7 @@ @@ -24,14 +24,14 @@ @@ -42,7 +42,7 @@ :selected-company="selectedCompany" :init-contacts="selectedContact" :is-cancel="isCancel" - :disabled="isSaved" + :disabled="isSaved || canEdit" v-decorator="['signedContactsId',validatorRules.signedContactsId]"> @@ -51,12 +51,14 @@ @@ -73,6 +75,7 @@ @@ -84,6 +87,7 @@ % @@ -96,6 +100,7 @@ v-decorator="['noTaxAmount',validatorRules.noTaxAmount]" :maxLength='50' @blur="addZero" + :disabled="canEdit" @change="noTaxChange"> @@ -115,6 +120,7 @@ style="width: 100%;" v-decorator="['contractDate']" :trigger-change="true" + :disabled="canEdit" date-format="YYYY-MM-DD"/> @@ -124,6 +130,7 @@ style="width: 100%;" v-decorator="['terminationDate']" :trigger-change="true" + :disabled="canEdit" date-format="YYYY-MM-DD"/> @@ -134,6 +141,7 @@ v-decorator="['contractTimePoints']" :maxLength='200' autosize + :disabled="canEdit" @change="e => {e.target.value = (e.target.value + '').trim()}"> @@ -154,6 +162,7 @@ v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]" :maxLength='50' @blur="addZero" + :disabled="canEdit" @change="accountsReceivableChange"> @@ -202,6 +211,7 @@ @@ -211,7 +221,7 @@ :trigger-change="true" placeholder="请选择是否打包" dictCode="yn" - :disabled="isSaved" + :disabled="isSaved || canEdit" @change="packageChange"/> @@ -220,7 +230,7 @@ @@ -250,13 +260,15 @@
关联项目
- 选择项目 + 选择项目
+ :can-operate="!canEdit" + ref="associatedProject"> +
@@ -434,6 +446,19 @@ export default { newFormData: {} // 传入的数据 } }, + computed: { + canEdit() { + // 待存档、草稿不限制 + if (this.model.status === 3 || this.model.status === 1) { + return false + } + // 已存档 + if (this.model.status === 5) { + return true + } + return false + } + }, mounted() { // 判断是编辑还是新增 if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) { @@ -609,7 +634,7 @@ export default { return } // value为undefined时清除部门名称 - this.form.setFieldsValue({departmentName: undefined}) + this.form.setFieldsValue({ departmentName: undefined }) }, /** * 打包状态修改 diff --git a/src/views/projectManagement/WorkingGroupProjectManagement.vue b/src/views/projectManagement/WorkingGroupProjectManagement.vue index 3be86d4..26eb84f 100644 --- a/src/views/projectManagement/WorkingGroupProjectManagement.vue +++ b/src/views/projectManagement/WorkingGroupProjectManagement.vue @@ -318,7 +318,8 @@ export default { this.$router.push({ path: '/projectManagement/WorkingGroupProjectManagement/UnderStudyProject', query: { - title: record.workingGroupProject + title: record.workingGroupProject, + id: record.id } }) } diff --git a/src/views/projectManagement/WorkingGroupUnderStudyProject.vue b/src/views/projectManagement/WorkingGroupUnderStudyProject.vue index 5bc8d67..79b1e64 100644 --- a/src/views/projectManagement/WorkingGroupUnderStudyProject.vue +++ b/src/views/projectManagement/WorkingGroupUnderStudyProject.vue @@ -65,6 +65,7 @@ import PageHeaderTitle from '../../components/layouts/PageHeaderTitle' import { JeroListMixin } from '../../mixins/JeroListMixin' import WorkingGroupUnderStudyProjectModal from './modules/WorkingGroupUnderStudyProjectModal' +import { getAction } from '../../api/manage' export default { name: 'WorkingGroupUnderStudyProject', @@ -93,17 +94,17 @@ export default { }, { title: '项目名称', align: 'center', - dataIndex: 'companyName', + dataIndex: 'projectName', scopedSlots: { customRender: 'text' } }, { title: '主要起草单位', align: 'center', - dataIndex: 'companyAddress', + dataIndex: 'draftCompany', scopedSlots: { customRender: 'text' } }, { title: '项目进度', align: 'center', - dataIndex: 'companyPhone', + dataIndex: 'projectSchedule', scopedSlots: { customRender: 'text' } }, { title: '操作', @@ -115,11 +116,58 @@ export default { } ], url: { - list: '', - delete: '', - deleteBatch: '' + list: '/payResearchProject/payResearchProject/list', + delete: '/payResearchProject/payResearchProject/delete', + deleteBatch: '/payResearchProject/payResearchProject/deleteBatch' } } + }, + methods: { + loadData(arg) { + if (!this.url.list) { + this.$message.error('请设置url.list属性!') + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1 + } + let params = this.getQueryParams()//查询条件 + params.workingGroupId = this.$route.query.id + this.loading = true + getAction(this.url.list, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records || res.result + if (res.result.total) { + this.ipagination.total = res.result.total + //清空列表选中 + this.onClearSelected() + } else { + this.ipagination.total = 0 + } + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false + }).finally(() => { + this.loading = false + }) + }, + handleEdit: function (record) { + this.$refs.modalForm.workingGroupId = this.$route.query.id + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = '编辑' + this.$refs.modalForm.disableSubmit = false + }, + handleAdd: function () { + this.$refs.modalForm.workingGroupId = this.$route.query.id + this.$refs.modalForm.add() + this.$refs.modalForm.title = '新增' + this.$refs.modalForm.disableSubmit = false + }, } } diff --git a/src/views/projectManagement/modules/WorkingGroupUnderStudyProjectModal.vue b/src/views/projectManagement/modules/WorkingGroupUnderStudyProjectModal.vue index 2d8a056..bd1e5cf 100644 --- a/src/views/projectManagement/modules/WorkingGroupUnderStudyProjectModal.vue +++ b/src/views/projectManagement/modules/WorkingGroupUnderStudyProjectModal.vue @@ -14,7 +14,7 @@ @@ -24,7 +24,7 @@ @@ -32,7 +32,7 @@ @@ -42,11 +42,11 @@ @@ -72,31 +72,45 @@ export default { confirmLoading: false, form: this.$form.createForm(this), model: {}, + // 工作组id + workingGroupId: '', labelCol: { xs: { span: 24 }, - sm: { span: 6 } + sm: { span: 8 } }, wrapperCol: { xs: { span: 24 }, - sm: { span: 18 } + sm: { span: 16 } }, remarksLabelCol: { xs: { span: 24 }, - sm: { span: 3 } + sm: { span: 4 } }, remarksWrapperCol: { xs: { span: 24 }, - sm: { span: 21 } + sm: { span: 20 } }, validatorRules: { - companyName: { - rules: [{ required: true, validator: this.checkCompanyName }], + projectName: { + rules: [{ required: true, message: '请输入项目名称' }], validateTrigger: 'blur' + }, + draftCompany: { + rules: [{ required: true, message: '请输入主要起草单位' }], + validateTrigger: 'blur' + }, + projectSchedule: { + rules: [{ required: true, message: '请输入项目进度' }], + validateTrigger: 'blur' + }, + files: { + rules: [{ required: true, message: '请上传过程文件' }], + validateTrigger: 'change' } }, url: { - add: '', - edit: '' + add: '/payResearchProject/payResearchProject/add', + edit: '/payResearchProject/payResearchProject/edit' } } }, @@ -109,7 +123,7 @@ export default { this.model = Object.assign({}, record) this.visible = true this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model)) + this.form.setFieldsValue(pick(this.model, 'projectName', 'draftCompany', 'projectSchedule', 'files')) }) }, close() { @@ -131,6 +145,7 @@ export default { } else { httpurl += this.url.edit } + values.workingGroupId = this.workingGroupId const formData = Object.assign(this.model, values) console.log('表单提交数据', formData) postAction(httpurl, formData).then((res) => {