[需求变更] 普通项目、工作组成员新增/编辑收入合同改为下拉(添加选择收入合同组件)
This commit is contained in:
@@ -82,6 +82,8 @@ const getIsAssociatedProject = (param) => getAction('/contract/payIncomeContract
|
||||
const aduitExpenditureContract = (param) => postAction('/contract/paySpendingContract/audit', param)
|
||||
// 支出合同存档
|
||||
const archiveExpenditureContract = (param) => postAction('/contract/paySpendingContract/archive', param)
|
||||
// 获取全部收入合同
|
||||
const getAllRevenueContract = (param) => getAction('', param)
|
||||
|
||||
export {
|
||||
getWorkingGroupById,
|
||||
@@ -124,5 +126,6 @@ export {
|
||||
getAllDepartTreeList,
|
||||
getIsAssociatedProject,
|
||||
aduitExpenditureContract,
|
||||
archiveExpenditureContract
|
||||
archiveExpenditureContract,
|
||||
getAllRevenueContract
|
||||
}
|
||||
|
||||
@@ -39,7 +39,11 @@ export default {
|
||||
*/
|
||||
initUserList() {
|
||||
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 :xl="12" :sm="24">
|
||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="chargeWayType === 2">
|
||||
<a-input placeholder="请输入合同号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @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-col>
|
||||
</a-row>
|
||||
@@ -189,10 +194,11 @@ import Vue from 'vue'
|
||||
import { USER_INFO } from '../../../store/mutation-types'
|
||||
import { money } from '../../../utils/validate'
|
||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'GeneralProjectModule',
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts },
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts, SelectRevenueContract },
|
||||
props: {
|
||||
// 收入合同关联时传入的企业信息,不可修改
|
||||
defaultChargeCompany: {
|
||||
@@ -304,7 +310,7 @@ export default {
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
contractNum: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
chargeNoticeNo: {
|
||||
|
||||
@@ -138,11 +138,16 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @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-col>
|
||||
</a-row>
|
||||
@@ -227,10 +232,11 @@ import { isRepeat } from '../../../utils/util'
|
||||
import { addZero } from '../../../utils/util'
|
||||
import { money } from '../../../utils/validate'
|
||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupMemberUnitModule',
|
||||
components: { JUpload, CompanySelect, SelectContacts },
|
||||
components: { JUpload, CompanySelect, SelectContacts, SelectRevenueContract },
|
||||
props: {
|
||||
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
||||
defaultChargeWay: {
|
||||
@@ -331,7 +337,7 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractNum: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
charge: {
|
||||
|
||||
Reference in New Issue
Block a user