[update] 工作组在研项目,收入合同修改
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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: '企业名称',
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
v-has="'revenueContract:delete'">删除</a>
|
||||
<a :disabled="true" v-if="record.status === 5">已存档</a>
|
||||
<!-- 待存档、已存档-->
|
||||
<a v-if="record.status === 3 && record.status === 5">报废</a>
|
||||
<a v-if="record.status === 3 || record.status === 5" @click="handleCancellation(record)">作废</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div >
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
@@ -21,7 +21,9 @@
|
||||
</span>
|
||||
</a-table>
|
||||
|
||||
<a-button type="primary" @click="submitAduit" :loading="associatedProjectLoading" v-if="canOperate" v-preventclick>{{associatedProjectDataSource.length === 0 ? '提交审核':'提交' }}</a-button>
|
||||
<a-button type="primary" @click="submitAduit" :loading="associatedProjectLoading" v-if="canOperate" v-preventclick>
|
||||
提交
|
||||
</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -180,17 +180,10 @@
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleEdit(detailData.id, detailData.contractNum)"
|
||||
v-if="detailData.status === 1 || detailData.status === 4"
|
||||
v-if="detailData.status === 1 || detailData.status === 3"
|
||||
v-has="'revenueContract:edit'">
|
||||
编辑
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleAudit(detailData.id)"
|
||||
v-if="detailData.status === 2"
|
||||
v-has="'revenueContract:aduit'">
|
||||
审核
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleArchive(detailData.id)"
|
||||
@@ -332,6 +325,9 @@ export default {
|
||||
let param = {
|
||||
id: this.$route.query.revenueId
|
||||
}
|
||||
if (!param.id || param.id === '') {
|
||||
return
|
||||
}
|
||||
getRevenueContractById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.detailData = res.result
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<a-input placeholder="请输入合同编号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -24,14 +24,14 @@
|
||||
<a-input placeholder="请输入合同名称"
|
||||
v-decorator="['contractName',validatorRules.contractName]"
|
||||
:maxLength='50'
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select placeholder="请选择签订单位"
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||
@change="handleSignedCompanyChange"></company-select>
|
||||
</a-form-item>
|
||||
@@ -42,7 +42,7 @@
|
||||
:selected-company="selectedCompany"
|
||||
:init-contacts="selectedContact"
|
||||
:is-cancel="isCancel"
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -51,12 +51,14 @@
|
||||
<j-dict-select-tag v-decorator="['opening']"
|
||||
:triggerChange="true"
|
||||
placeholder="请选择是否开口"
|
||||
:disabled="canEdit"
|
||||
dictCode="yn"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-principal placeholder="请选择负责人"
|
||||
:disabled="canEdit"
|
||||
v-decorator="['principalId',validatorRules.principalId]"
|
||||
@change="principalChange"></select-principal>
|
||||
</a-form-item>
|
||||
@@ -73,6 +75,7 @@
|
||||
<a-input placeholder="请输入签订合同总金额"
|
||||
v-decorator="['contractAmount',validatorRules.contractAmount]"
|
||||
:maxLength='50'
|
||||
:disabled="canEdit"
|
||||
@blur="addZero"
|
||||
@change="contractAmountChange"></a-input>
|
||||
</a-form-item>
|
||||
@@ -84,6 +87,7 @@
|
||||
<a-input placeholder="请输入税率"
|
||||
v-decorator="['rate',validatorRules.rate]"
|
||||
:maxLength='50'
|
||||
:disabled="canEdit"
|
||||
@change="rateChange"></a-input>
|
||||
</a-col>
|
||||
<a-col :span="1">%</a-col>
|
||||
@@ -96,6 +100,7 @@
|
||||
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
||||
:maxLength='50'
|
||||
@blur="addZero"
|
||||
:disabled="canEdit"
|
||||
@change="noTaxChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -115,6 +120,7 @@
|
||||
style="width: 100%;"
|
||||
v-decorator="['contractDate']"
|
||||
:trigger-change="true"
|
||||
:disabled="canEdit"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -124,6 +130,7 @@
|
||||
style="width: 100%;"
|
||||
v-decorator="['terminationDate']"
|
||||
:trigger-change="true"
|
||||
:disabled="canEdit"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -134,6 +141,7 @@
|
||||
v-decorator="['contractTimePoints']"
|
||||
:maxLength='200'
|
||||
autosize
|
||||
:disabled="canEdit"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -154,6 +162,7 @@
|
||||
v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
||||
:maxLength='50'
|
||||
@blur="addZero"
|
||||
:disabled="canEdit"
|
||||
@change="accountsReceivableChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -202,6 +211,7 @@
|
||||
<a-input placeholder="请输入合同约定付款次数"
|
||||
v-decorator="['contractPaymentTimes']"
|
||||
:maxLength='50'
|
||||
:disabled="canEdit"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -211,7 +221,7 @@
|
||||
:trigger-change="true"
|
||||
placeholder="请选择是否打包"
|
||||
dictCode="yn"
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
@change="packageChange"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -220,7 +230,7 @@
|
||||
<j-year-date style="width:100%"
|
||||
placeholder="请选择打包年份"
|
||||
:disabledDate="disabledPackDate"
|
||||
:disabled="isSaved"
|
||||
:disabled="isSaved || canEdit"
|
||||
v-decorator="['packYear',validatorRules.packYear]"></j-year-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -250,13 +260,15 @@
|
||||
<a-card :bordered="false" v-if="isSaved" class="associated-project">
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">关联项目</div>
|
||||
<a-button type="link" @click="chooseProject" v-has="'revenueContractModule:chooseProject'">选择项目
|
||||
<a-button type="link" @click="chooseProject" v-has="'revenueContractModule:chooseProject'" v-if="!canEdit">选择项目
|
||||
<a-icon type="right"></a-icon>
|
||||
</a-button>
|
||||
</div>
|
||||
<associated-project
|
||||
:contract-id="contractId"
|
||||
ref="associatedProject"></associated-project>
|
||||
:can-operate="!canEdit"
|
||||
ref="associatedProject">
|
||||
</associated-project>
|
||||
</a-card>
|
||||
<a-card :bordered="false" v-else class="associated-project" style="height: 200px"></a-card>
|
||||
|
||||
@@ -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 })
|
||||
},
|
||||
/**
|
||||
* 打包状态修改
|
||||
|
||||
@@ -318,7 +318,8 @@ export default {
|
||||
this.$router.push({
|
||||
path: '/projectManagement/WorkingGroupProjectManagement/UnderStudyProject',
|
||||
query: {
|
||||
title: record.workingGroupProject
|
||||
title: record.workingGroupProject,
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<a-col>
|
||||
<a-form-item label="项目名称" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||
<a-input placeholder="请输入项目名称"
|
||||
v-decorator="['companyName',validatorRules.companyName]"
|
||||
v-decorator="['projectName',validatorRules.projectName]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
@@ -24,7 +24,7 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="主要起草单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入主要起草单位"
|
||||
v-decorator="['dutyCode', validatorRules.dutyCode]"
|
||||
v-decorator="['draftCompany', validatorRules.draftCompany]"
|
||||
:maxLength='18'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
@@ -32,7 +32,7 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="项目进度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入项目进度"
|
||||
v-decorator="['dutyCode', validatorRules.dutyCode]"
|
||||
v-decorator="['projectSchedule', validatorRules.projectSchedule]"
|
||||
:maxLength='18'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
@@ -42,11 +42,11 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="过程文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-upload file-type="all"
|
||||
file-type-error-message="请上传文件"
|
||||
file-type-error-message="请上传过程文件"
|
||||
:multiple="true"
|
||||
:number="10"
|
||||
:return-id="true"
|
||||
v-decorator="['fileIds', validatorRules.fileIds]"
|
||||
v-decorator="['files', validatorRules.files]"
|
||||
:trigger-change="true"></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user