[需求变更] 普通项目、工作组成员新增/编辑收入合同改为下拉(添加选择收入合同组件)
This commit is contained in:
@@ -82,6 +82,8 @@ const getIsAssociatedProject = (param) => getAction('/contract/payIncomeContract
|
|||||||
const aduitExpenditureContract = (param) => postAction('/contract/paySpendingContract/audit', param)
|
const aduitExpenditureContract = (param) => postAction('/contract/paySpendingContract/audit', param)
|
||||||
// 支出合同存档
|
// 支出合同存档
|
||||||
const archiveExpenditureContract = (param) => postAction('/contract/paySpendingContract/archive', param)
|
const archiveExpenditureContract = (param) => postAction('/contract/paySpendingContract/archive', param)
|
||||||
|
// 获取全部收入合同
|
||||||
|
const getAllRevenueContract = (param) => getAction('', param)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getWorkingGroupById,
|
getWorkingGroupById,
|
||||||
@@ -124,5 +126,6 @@ export {
|
|||||||
getAllDepartTreeList,
|
getAllDepartTreeList,
|
||||||
getIsAssociatedProject,
|
getIsAssociatedProject,
|
||||||
aduitExpenditureContract,
|
aduitExpenditureContract,
|
||||||
archiveExpenditureContract
|
archiveExpenditureContract,
|
||||||
|
getAllRevenueContract
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ export default {
|
|||||||
*/
|
*/
|
||||||
initUserList() {
|
initUserList() {
|
||||||
getAllUserList().then(res => {
|
getAllUserList().then(res => {
|
||||||
this.userList = res.result
|
if (res.success) {
|
||||||
|
this.userList = res.result
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 下拉框的搜索
|
// 下拉框的搜索
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<a-select
|
||||||
|
:value="value"
|
||||||
|
v-bind="$attrs"
|
||||||
|
v-on="$listeners"
|
||||||
|
show-search
|
||||||
|
allowClear
|
||||||
|
option-filter-prop="children"
|
||||||
|
:filter-option="filterOption">
|
||||||
|
<a-select-option v-for="item in contractList" :key="item.id" :value="item.contractNum">
|
||||||
|
{{ item.contractNum }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAllRevenueContract } from '../../api/incomePaymentsApi'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SelectRevenueContract',
|
||||||
|
props: {
|
||||||
|
// 绑定值--合同号
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 合同列表
|
||||||
|
contractList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initRevenueContractList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initRevenueContractList() {
|
||||||
|
getAllRevenueContract().then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.contractList = res.result.records
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 下拉框的搜索
|
||||||
|
filterOption(input, option) {
|
||||||
|
console.log(option)
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
prop: 'value',
|
||||||
|
event: 'change'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -120,11 +120,16 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="12" :sm="24">
|
<a-col :xl="12" :sm="24">
|
||||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="chargeWayType === 2">
|
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="chargeWayType === 2">
|
||||||
<a-input placeholder="请输入合同号"
|
<!-- <a-input placeholder="请输入合同号"-->
|
||||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||||
:maxLength='50'
|
<!-- :maxLength='50'-->
|
||||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||||
|
<select-revenue-contract
|
||||||
|
placeholder="请选择合同号"
|
||||||
|
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||||
|
:disabled="isContractNumDisabled || isAssociatedContract">
|
||||||
|
</select-revenue-contract>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -189,10 +194,11 @@ import Vue from 'vue'
|
|||||||
import { USER_INFO } from '../../../store/mutation-types'
|
import { USER_INFO } from '../../../store/mutation-types'
|
||||||
import { money } from '../../../utils/validate'
|
import { money } from '../../../utils/validate'
|
||||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||||
|
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GeneralProjectModule',
|
name: 'GeneralProjectModule',
|
||||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts },
|
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts, SelectRevenueContract },
|
||||||
props: {
|
props: {
|
||||||
// 收入合同关联时传入的企业信息,不可修改
|
// 收入合同关联时传入的企业信息,不可修改
|
||||||
defaultChargeCompany: {
|
defaultChargeCompany: {
|
||||||
@@ -304,7 +310,7 @@ export default {
|
|||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
},
|
},
|
||||||
contractNum: {
|
contractNum: {
|
||||||
rules: [{ required: true, message: '请输入合同号' }],
|
rules: [{ required: true, message: '请选择合同号' }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
chargeNoticeNo: {
|
chargeNoticeNo: {
|
||||||
|
|||||||
@@ -138,11 +138,16 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<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="['contractNum',validatorRules.contractNum]"
|
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||||
:maxLength='50'
|
<!-- :maxLength='50'-->
|
||||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||||
|
<select-revenue-contract
|
||||||
|
placeholder="请选择合同号"
|
||||||
|
v-decorator="['contractNum',validatorRules.contractNum]">
|
||||||
|
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||||
|
</select-revenue-contract>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -227,10 +232,11 @@ import { isRepeat } from '../../../utils/util'
|
|||||||
import { addZero } from '../../../utils/util'
|
import { addZero } from '../../../utils/util'
|
||||||
import { money } from '../../../utils/validate'
|
import { money } from '../../../utils/validate'
|
||||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||||
|
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkingGroupMemberUnitModule',
|
name: 'WorkingGroupMemberUnitModule',
|
||||||
components: { JUpload, CompanySelect, SelectContacts },
|
components: { JUpload, CompanySelect, SelectContacts, SelectRevenueContract },
|
||||||
props: {
|
props: {
|
||||||
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
||||||
defaultChargeWay: {
|
defaultChargeWay: {
|
||||||
@@ -331,7 +337,7 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
contractNum: {
|
contractNum: {
|
||||||
rules: [{ required: true, message: '请输入合同号' }],
|
rules: [{ required: true, message: '请选择合同号' }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
charge: {
|
charge: {
|
||||||
|
|||||||
Reference in New Issue
Block a user