[update] 工作组在研项目,收入合同修改
This commit is contained in:
@@ -91,6 +91,8 @@ const getPrintPostContactByMailId = (param) => getAction('/mail/payMailBill/prin
|
|||||||
|
|
||||||
// 全所统计--通过部门code查所有人员
|
// 全所统计--通过部门code查所有人员
|
||||||
const getUserByDepartCode = (param) => getAction('/statistics/allProjectStatistics/listForUserByOrgCode', param)
|
const getUserByDepartCode = (param) => getAction('/statistics/allProjectStatistics/listForUserByOrgCode', param)
|
||||||
|
// 收入合同--作废
|
||||||
|
const cancellationContract = (param) => postAction('/contract/payIncomeContract/cancellation', param)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getWorkingGroupById,
|
getWorkingGroupById,
|
||||||
@@ -137,5 +139,6 @@ export {
|
|||||||
archiveExpenditureContract,
|
archiveExpenditureContract,
|
||||||
getAllRevenueContract,
|
getAllRevenueContract,
|
||||||
getPrintPostContactByMailId,
|
getPrintPostContactByMailId,
|
||||||
getUserByDepartCode
|
getUserByDepartCode,
|
||||||
|
cancellationContract
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,9 +142,15 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 140,
|
width: 140,
|
||||||
dataIndex: 'phone'
|
dataIndex: 'phone'
|
||||||
|
},{
|
||||||
|
title: '角色',
|
||||||
|
align: 'center',
|
||||||
|
width: 140,
|
||||||
|
dataIndex: 'roleCode_dictText'
|
||||||
}, {
|
}, {
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 150,
|
||||||
dataIndex: 'createTime'
|
dataIndex: 'createTime'
|
||||||
}, {
|
}, {
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
v-has="'revenueContract:delete'">删除</a>
|
v-has="'revenueContract:delete'">删除</a>
|
||||||
<a :disabled="true" v-if="record.status === 5">已存档</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>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -155,7 +155,7 @@ import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
|||||||
import RevenueContractAduitModule from './modules/RevenueContractAduitModule'
|
import RevenueContractAduitModule from './modules/RevenueContractAduitModule'
|
||||||
import JDate from '../../../components/tools/JDate'
|
import JDate from '../../../components/tools/JDate'
|
||||||
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
||||||
import { archiveRevenueContract } from '../../../api/incomePaymentsApi'
|
import { archiveRevenueContract, cancellationContract } from '../../../api/incomePaymentsApi'
|
||||||
import JYearDate from '../../../components/jero/JYearDate'
|
import JYearDate from '../../../components/jero/JYearDate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -351,6 +351,35 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.isPackage = false
|
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>
|
<template>
|
||||||
<div >
|
<div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
@@ -21,7 +21,9 @@
|
|||||||
</span>
|
</span>
|
||||||
</a-table>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -113,7 +115,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
associatedProjectDataSource: [],
|
associatedProjectDataSource: [],
|
||||||
associatedProjectLoading: false, // 关联项目表格加载
|
associatedProjectLoading: false // 关联项目表格加载
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -162,6 +164,9 @@ export default {
|
|||||||
* 获取关联项目列表
|
* 获取关联项目列表
|
||||||
*/
|
*/
|
||||||
loadAssociatedProject() {
|
loadAssociatedProject() {
|
||||||
|
if (!this.contractId || this.contractId === '') {
|
||||||
|
return
|
||||||
|
}
|
||||||
const param = {
|
const param = {
|
||||||
contractId: this.contractId
|
contractId: this.contractId
|
||||||
}
|
}
|
||||||
@@ -191,7 +196,7 @@ export default {
|
|||||||
this.associatedProjectLoading = true
|
this.associatedProjectLoading = true
|
||||||
const param = {
|
const param = {
|
||||||
id: this.contractId,
|
id: this.contractId,
|
||||||
status: 2
|
status: 3
|
||||||
}
|
}
|
||||||
submitAudit(param).then(res => {
|
submitAudit(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
@@ -180,17 +180,10 @@
|
|||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleEdit(detailData.id, detailData.contractNum)"
|
@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'">
|
v-has="'revenueContract:edit'">
|
||||||
编辑
|
编辑
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
@click="handleAudit(detailData.id)"
|
|
||||||
v-if="detailData.status === 2"
|
|
||||||
v-has="'revenueContract:aduit'">
|
|
||||||
审核
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleArchive(detailData.id)"
|
@click="handleArchive(detailData.id)"
|
||||||
@@ -332,6 +325,9 @@ export default {
|
|||||||
let param = {
|
let param = {
|
||||||
id: this.$route.query.revenueId
|
id: this.$route.query.revenueId
|
||||||
}
|
}
|
||||||
|
if (!param.id || param.id === '') {
|
||||||
|
return
|
||||||
|
}
|
||||||
getRevenueContractById(param).then(res => {
|
getRevenueContractById(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.detailData = res.result
|
this.detailData = res.result
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<a-input placeholder="请输入合同编号"
|
<a-input placeholder="请输入合同编号"
|
||||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -24,14 +24,14 @@
|
|||||||
<a-input placeholder="请输入合同名称"
|
<a-input placeholder="请输入合同名称"
|
||||||
v-decorator="['contractName',validatorRules.contractName]"
|
v-decorator="['contractName',validatorRules.contractName]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<company-select placeholder="请选择签订单位"
|
<company-select placeholder="请选择签订单位"
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||||
@change="handleSignedCompanyChange"></company-select>
|
@change="handleSignedCompanyChange"></company-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
:selected-company="selectedCompany"
|
:selected-company="selectedCompany"
|
||||||
:init-contacts="selectedContact"
|
:init-contacts="selectedContact"
|
||||||
:is-cancel="isCancel"
|
:is-cancel="isCancel"
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -51,12 +51,14 @@
|
|||||||
<j-dict-select-tag v-decorator="['opening']"
|
<j-dict-select-tag v-decorator="['opening']"
|
||||||
:triggerChange="true"
|
:triggerChange="true"
|
||||||
placeholder="请选择是否开口"
|
placeholder="请选择是否开口"
|
||||||
|
:disabled="canEdit"
|
||||||
dictCode="yn"/>
|
dictCode="yn"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-principal placeholder="请选择负责人"
|
<select-principal placeholder="请选择负责人"
|
||||||
|
:disabled="canEdit"
|
||||||
v-decorator="['principalId',validatorRules.principalId]"
|
v-decorator="['principalId',validatorRules.principalId]"
|
||||||
@change="principalChange"></select-principal>
|
@change="principalChange"></select-principal>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -73,6 +75,7 @@
|
|||||||
<a-input placeholder="请输入签订合同总金额"
|
<a-input placeholder="请输入签订合同总金额"
|
||||||
v-decorator="['contractAmount',validatorRules.contractAmount]"
|
v-decorator="['contractAmount',validatorRules.contractAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="canEdit"
|
||||||
@blur="addZero"
|
@blur="addZero"
|
||||||
@change="contractAmountChange"></a-input>
|
@change="contractAmountChange"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -84,6 +87,7 @@
|
|||||||
<a-input placeholder="请输入税率"
|
<a-input placeholder="请输入税率"
|
||||||
v-decorator="['rate',validatorRules.rate]"
|
v-decorator="['rate',validatorRules.rate]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="canEdit"
|
||||||
@change="rateChange"></a-input>
|
@change="rateChange"></a-input>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="1">%</a-col>
|
<a-col :span="1">%</a-col>
|
||||||
@@ -96,6 +100,7 @@
|
|||||||
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@blur="addZero"
|
@blur="addZero"
|
||||||
|
:disabled="canEdit"
|
||||||
@change="noTaxChange"></a-input>
|
@change="noTaxChange"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -115,6 +120,7 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
v-decorator="['contractDate']"
|
v-decorator="['contractDate']"
|
||||||
:trigger-change="true"
|
:trigger-change="true"
|
||||||
|
:disabled="canEdit"
|
||||||
date-format="YYYY-MM-DD"/>
|
date-format="YYYY-MM-DD"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -124,6 +130,7 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
v-decorator="['terminationDate']"
|
v-decorator="['terminationDate']"
|
||||||
:trigger-change="true"
|
:trigger-change="true"
|
||||||
|
:disabled="canEdit"
|
||||||
date-format="YYYY-MM-DD"/>
|
date-format="YYYY-MM-DD"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -134,6 +141,7 @@
|
|||||||
v-decorator="['contractTimePoints']"
|
v-decorator="['contractTimePoints']"
|
||||||
:maxLength='200'
|
:maxLength='200'
|
||||||
autosize
|
autosize
|
||||||
|
:disabled="canEdit"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-textarea>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-textarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -154,6 +162,7 @@
|
|||||||
v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@blur="addZero"
|
@blur="addZero"
|
||||||
|
:disabled="canEdit"
|
||||||
@change="accountsReceivableChange"></a-input>
|
@change="accountsReceivableChange"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -202,6 +211,7 @@
|
|||||||
<a-input placeholder="请输入合同约定付款次数"
|
<a-input placeholder="请输入合同约定付款次数"
|
||||||
v-decorator="['contractPaymentTimes']"
|
v-decorator="['contractPaymentTimes']"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="canEdit"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -211,7 +221,7 @@
|
|||||||
:trigger-change="true"
|
:trigger-change="true"
|
||||||
placeholder="请选择是否打包"
|
placeholder="请选择是否打包"
|
||||||
dictCode="yn"
|
dictCode="yn"
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
@change="packageChange"/>
|
@change="packageChange"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -220,7 +230,7 @@
|
|||||||
<j-year-date style="width:100%"
|
<j-year-date style="width:100%"
|
||||||
placeholder="请选择打包年份"
|
placeholder="请选择打包年份"
|
||||||
:disabledDate="disabledPackDate"
|
:disabledDate="disabledPackDate"
|
||||||
:disabled="isSaved"
|
:disabled="isSaved || canEdit"
|
||||||
v-decorator="['packYear',validatorRules.packYear]"></j-year-date>
|
v-decorator="['packYear',validatorRules.packYear]"></j-year-date>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -250,13 +260,15 @@
|
|||||||
<a-card :bordered="false" v-if="isSaved" class="associated-project">
|
<a-card :bordered="false" v-if="isSaved" class="associated-project">
|
||||||
<div class="part-title">
|
<div class="part-title">
|
||||||
<div class="part-title-text">关联项目</div>
|
<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-icon type="right"></a-icon>
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<associated-project
|
<associated-project
|
||||||
:contract-id="contractId"
|
:contract-id="contractId"
|
||||||
ref="associatedProject"></associated-project>
|
:can-operate="!canEdit"
|
||||||
|
ref="associatedProject">
|
||||||
|
</associated-project>
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card :bordered="false" v-else class="associated-project" style="height: 200px"></a-card>
|
<a-card :bordered="false" v-else class="associated-project" style="height: 200px"></a-card>
|
||||||
|
|
||||||
@@ -434,6 +446,19 @@ export default {
|
|||||||
newFormData: {} // 传入的数据
|
newFormData: {} // 传入的数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
canEdit() {
|
||||||
|
// 待存档、草稿不限制
|
||||||
|
if (this.model.status === 3 || this.model.status === 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 已存档
|
||||||
|
if (this.model.status === 5) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 判断是编辑还是新增
|
// 判断是编辑还是新增
|
||||||
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) {
|
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) {
|
||||||
@@ -609,7 +634,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// value为undefined时清除部门名称
|
// value为undefined时清除部门名称
|
||||||
this.form.setFieldsValue({departmentName: undefined})
|
this.form.setFieldsValue({ departmentName: undefined })
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 打包状态修改
|
* 打包状态修改
|
||||||
|
|||||||
@@ -318,7 +318,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/projectManagement/WorkingGroupProjectManagement/UnderStudyProject',
|
path: '/projectManagement/WorkingGroupProjectManagement/UnderStudyProject',
|
||||||
query: {
|
query: {
|
||||||
title: record.workingGroupProject
|
title: record.workingGroupProject,
|
||||||
|
id: record.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
||||||
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
||||||
import WorkingGroupUnderStudyProjectModal from './modules/WorkingGroupUnderStudyProjectModal'
|
import WorkingGroupUnderStudyProjectModal from './modules/WorkingGroupUnderStudyProjectModal'
|
||||||
|
import { getAction } from '../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkingGroupUnderStudyProject',
|
name: 'WorkingGroupUnderStudyProject',
|
||||||
@@ -93,17 +94,17 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'companyName',
|
dataIndex: 'projectName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
}, {
|
}, {
|
||||||
title: '主要起草单位',
|
title: '主要起草单位',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'companyAddress',
|
dataIndex: 'draftCompany',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
}, {
|
}, {
|
||||||
title: '项目进度',
|
title: '项目进度',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'companyPhone',
|
dataIndex: 'projectSchedule',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
}, {
|
}, {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@@ -115,11 +116,58 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: '',
|
list: '/payResearchProject/payResearchProject/list',
|
||||||
delete: '',
|
delete: '/payResearchProject/payResearchProject/delete',
|
||||||
deleteBatch: ''
|
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>
|
</script>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item label="项目名称" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
<a-form-item label="项目名称" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
<a-input placeholder="请输入项目名称"
|
<a-input placeholder="请输入项目名称"
|
||||||
v-decorator="['companyName',validatorRules.companyName]"
|
v-decorator="['projectName',validatorRules.projectName]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<a-col :xl="12" :sm="24">
|
<a-col :xl="12" :sm="24">
|
||||||
<a-form-item label="主要起草单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="主要起草单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入主要起草单位"
|
<a-input placeholder="请输入主要起草单位"
|
||||||
v-decorator="['dutyCode', validatorRules.dutyCode]"
|
v-decorator="['draftCompany', validatorRules.draftCompany]"
|
||||||
:maxLength='18'
|
:maxLength='18'
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<a-col :xl="12" :sm="24">
|
<a-col :xl="12" :sm="24">
|
||||||
<a-form-item label="项目进度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="项目进度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入项目进度"
|
<a-input placeholder="请输入项目进度"
|
||||||
v-decorator="['dutyCode', validatorRules.dutyCode]"
|
v-decorator="['projectSchedule', validatorRules.projectSchedule]"
|
||||||
:maxLength='18'
|
:maxLength='18'
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
<a-col :xl="12" :sm="24">
|
<a-col :xl="12" :sm="24">
|
||||||
<a-form-item label="过程文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="过程文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<j-upload file-type="all"
|
<j-upload file-type="all"
|
||||||
file-type-error-message="请上传文件"
|
file-type-error-message="请上传过程文件"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:number="10"
|
:number="10"
|
||||||
:return-id="true"
|
:return-id="true"
|
||||||
v-decorator="['fileIds', validatorRules.fileIds]"
|
v-decorator="['files', validatorRules.files]"
|
||||||
:trigger-change="true"></j-upload>
|
:trigger-change="true"></j-upload>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -72,31 +72,45 @@ export default {
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
model: {},
|
model: {},
|
||||||
|
// 工作组id
|
||||||
|
workingGroupId: '',
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 6 }
|
sm: { span: 8 }
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 18 }
|
sm: { span: 16 }
|
||||||
},
|
},
|
||||||
remarksLabelCol: {
|
remarksLabelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 3 }
|
sm: { span: 4 }
|
||||||
},
|
},
|
||||||
remarksWrapperCol: {
|
remarksWrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 21 }
|
sm: { span: 20 }
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
companyName: {
|
projectName: {
|
||||||
rules: [{ required: true, validator: this.checkCompanyName }],
|
rules: [{ required: true, message: '请输入项目名称' }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
draftCompany: {
|
||||||
|
rules: [{ required: true, message: '请输入主要起草单位' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
projectSchedule: {
|
||||||
|
rules: [{ required: true, message: '请输入项目进度' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
rules: [{ required: true, message: '请上传过程文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '',
|
add: '/payResearchProject/payResearchProject/add',
|
||||||
edit: ''
|
edit: '/payResearchProject/payResearchProject/edit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -109,7 +123,7 @@ export default {
|
|||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model))
|
this.form.setFieldsValue(pick(this.model, 'projectName', 'draftCompany', 'projectSchedule', 'files'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
@@ -131,6 +145,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
httpurl += this.url.edit
|
httpurl += this.url.edit
|
||||||
}
|
}
|
||||||
|
values.workingGroupId = this.workingGroupId
|
||||||
const formData = Object.assign(this.model, values)
|
const formData = Object.assign(this.model, values)
|
||||||
console.log('表单提交数据', formData)
|
console.log('表单提交数据', formData)
|
||||||
postAction(httpurl, formData).then((res) => {
|
postAction(httpurl, formData).then((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user