diff --git a/src/api/incomePaymentsApi.js b/src/api/incomePaymentsApi.js
index d3876d0..7a7cd38 100644
--- a/src/api/incomePaymentsApi.js
+++ b/src/api/incomePaymentsApi.js
@@ -93,6 +93,8 @@ const getPrintPostContactByMailId = (param) => getAction('/mail/payMailBill/prin
const getUserByDepartCode = (param) => getAction('/statistics/allProjectStatistics/listForUserByOrgCode', param)
// 收入合同--作废
const cancellationContract = (param) => postAction('/contract/payIncomeContract/cancellation', param)
+// 支出合同--作废
+const cancellationExpenditureContract = (param) => postAction('/contract/paySpendingContract/cancellation', param)
export {
getWorkingGroupById,
@@ -140,5 +142,6 @@ export {
getAllRevenueContract,
getPrintPostContactByMailId,
getUserByDepartCode,
- cancellationContract
+ cancellationContract,
+ cancellationExpenditureContract
}
diff --git a/src/views/contractManagement/expenditureContract/ExpenditureContractDetail.vue b/src/views/contractManagement/expenditureContract/ExpenditureContractDetail.vue
index 6db42ae..ab5b167 100644
--- a/src/views/contractManagement/expenditureContract/ExpenditureContractDetail.vue
+++ b/src/views/contractManagement/expenditureContract/ExpenditureContractDetail.vue
@@ -134,29 +134,29 @@
-
+
-
-
-
-
-
- {{ item.createBy }}
- {{ item.createTime }}
-
-
- {{ item.contractStatus_dictText === '待存档' ? '审核通过' : item.contractStatus_dictText }}
-
- {{ item.explainRemarks }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -170,17 +170,17 @@
编辑
-
- 审核
-
+
+
+
+
+
+
+
this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
}
},
- mounted() {
- this.initDetailData(this.$route.query.revenueId)
+ created() {
+ this.initDetailData()
},
methods: {
initDetailData() {
+ if (!this.$route.query.revenueId) {
+ return
+ }
this.loading = true
let param = {
id: this.$route.query.revenueId
@@ -324,8 +327,9 @@ export default {
this.detailData = res.result
// this.detailData.pack = this.detailData.pack === 1 ? '是' : this.detailData.pack === 0 ? '否' : ''
} else {
+ //TODO 别的页面会调这边的接口,所以把异常给关了
// 添加异常判断,防止消息进入详情无法正常获取数据造成卡死及控制台报错
- this.$message.warn(res.message)
+ console.log(res.message)
}
}).finally(() => {
this.loading = false
diff --git a/src/views/contractManagement/expenditureContract/ExpenditureContractList.vue b/src/views/contractManagement/expenditureContract/ExpenditureContractList.vue
index b527d29..f57a8a9 100644
--- a/src/views/contractManagement/expenditureContract/ExpenditureContractList.vue
+++ b/src/views/contractManagement/expenditureContract/ExpenditureContractList.vue
@@ -121,6 +121,9 @@
v-has="'expenditureContract:delete'"
v-if="record.status === 6">删除
已存档
+
+ 作废
@@ -136,7 +139,7 @@ import IconImg from '@assets/imgs/icon/icon_revenue_contract.png'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
import JDate from '../../../components/tools/JDate'
-import { archiveExpenditureContract } from '../../../api/incomePaymentsApi'
+import { archiveExpenditureContract, cancellationExpenditureContract } from '../../../api/incomePaymentsApi'
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
export default {
@@ -308,6 +311,35 @@ export default {
})
}
})
+ },
+ /**
+ * 合同作废
+ * @param record
+ */
+ handleCancellation(record) {
+ let that = this
+ this.$confirm({
+ title: '作废',
+ content: '确认作废?',
+ onOk: function () {
+ that.loading = true
+ that.loading = false
+ let param = {
+ contractId: record.id
+ }
+ cancellationExpenditureContract(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/expenditureContract/modules/ExpenditureContractModule.vue b/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue
index 9c4c24d..49e98f8 100644
--- a/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue
+++ b/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue
@@ -15,6 +15,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -23,6 +24,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -31,6 +33,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -39,6 +42,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -46,6 +50,7 @@
@@ -53,6 +58,7 @@
@@ -69,6 +75,7 @@
@@ -80,6 +87,7 @@
%
@@ -91,6 +99,7 @@
@@ -111,6 +120,7 @@
style="width: 100%;"
v-decorator="['contractDate']"
:trigger-change="true"
+ :disabled="canEdit"
date-format="YYYY-MM-DD"/>
@@ -120,6 +130,7 @@
style="width: 100%;"
v-decorator="['terminationDate']"
:trigger-change="true"
+ :disabled="canEdit"
date-format="YYYY-MM-DD"/>
@@ -129,6 +140,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -149,6 +161,7 @@
@@ -158,6 +171,7 @@
@@ -197,6 +211,7 @@
{e.target.value = (e.target.value + '').trim()}">
@@ -345,6 +360,19 @@ export default {
}
}
},
+ computed: {
+ canEdit() {
+ // 待存档、草稿不限制
+ if (this.model.status === 3) {
+ return false
+ }
+ // 已存档
+ if (this.model.status === 5) {
+ return true
+ }
+ return false
+ }
+ },
mounted() {
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'contractId')) {
this.contractId = this.$route.query.contractId
@@ -403,16 +431,7 @@ export default {
})
},
save() {
- const that = this
- this.$confirm({
- title: '提示',
- content: '保存后将进入待审核状态,无法编辑,确定要保存吗 ?',
- onOk() {
- that.handleSave()
- },
- onCancel() {
- },
- })
+ this.handleSave()
},
/**
* 表单提交
@@ -552,7 +571,7 @@ export default {
return
}
// value为undefined时清除部门名称
- this.form.setFieldsValue({departmentName: undefined})
+ this.form.setFieldsValue({ departmentName: undefined })
},
/**
* 总签订金额修改
diff --git a/src/views/contractManagement/revenueContract/RevenueContractList.vue b/src/views/contractManagement/revenueContract/RevenueContractList.vue
index 7e1fc8d..ddb2cc0 100644
--- a/src/views/contractManagement/revenueContract/RevenueContractList.vue
+++ b/src/views/contractManagement/revenueContract/RevenueContractList.vue
@@ -139,7 +139,7 @@
v-has="'revenueContract:delete'">删除
已存档
- 作废
+ 作废
diff --git a/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue b/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue
index e93f608..8e526dd 100644
--- a/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue
+++ b/src/views/contractManagement/revenueContract/modules/AssociatedProject.vue
@@ -178,7 +178,7 @@ export default {
if (res.success) {
this.associatedProjectDataSource = res.result
} else {
- this.$message.warn(res.message)
+ console.log(res.message)
}
}).finally(() => {
this.associatedProjectLoading = false
diff --git a/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue b/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue
index 49c9103..d5274b6 100644
--- a/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue
+++ b/src/views/contractManagement/revenueContract/modules/RevenueContractDetail.vue
@@ -144,29 +144,29 @@
-
+
-
-
-
-
-
- {{ item.createBy }}
- {{ item.createTime }}
-
-
- {{ item.contractStatus_dictText === '待存档' ? '审核通过' : item.contractStatus_dictText }}
-
- {{ item.explainRemarks }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -315,9 +315,11 @@ export default {
return this.otherInfoList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
}
},
- mounted() {
+ created() {
this.initDetailData(this.$route.query.revenueId)
- this.$refs.associatedProject.loadAssociatedProject()
+ this.$nextTick(() => {
+ this.$refs.associatedProject.loadAssociatedProject()
+ })
},
methods: {
initDetailData() {
@@ -333,8 +335,9 @@ export default {
this.detailData = res.result
this.detailData.pack = this.detailData.pack === 1 ? '是' : this.detailData.pack === 0 ? '否' : ''
} else {
+ //TODO 别的页面会调这边的接口,所以把异常给关了
// 添加异常判断,防止消息进入详情无法正常获取数据造成卡死及控制台报错
- this.$message.warn(res.message)
+ console.log(res.message)
}
}).finally(() => {
this.loading = false