[update] 收入合同项目关联接口联调;支出合同页面
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
<company-select placeholder="请选择来款企业"
|
||||
v-decorator="['chargeCompany',validatorRules.chargeCompany]"
|
||||
@change="companyChange"
|
||||
:disabled="disabledChargeCompany"
|
||||
:maxLength='50'>
|
||||
</company-select>
|
||||
</a-form-item>
|
||||
@@ -170,6 +171,22 @@ import SelectContacts from '@comp/company/SelectContacts'
|
||||
export default {
|
||||
name: 'GeneralProjectModule',
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts },
|
||||
props: {
|
||||
// 收入合同关联时传入的企业信息,不可修改
|
||||
defaultChargeCompany: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否可以修改来款企业
|
||||
disabledChargeCompany: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '操作',
|
||||
@@ -257,11 +274,19 @@ export default {
|
||||
methods: {
|
||||
add() {
|
||||
this.edit({})
|
||||
console.log(this.defaultChargeCompany, '============')
|
||||
},
|
||||
edit(record) {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
||||
record.chargeCompany = {
|
||||
id: this.defaultChargeCompany.id,
|
||||
companyName: this.defaultChargeCompany.companyName
|
||||
}
|
||||
} else {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
}
|
||||
}
|
||||
// 回显选中的企业
|
||||
this.selectedCompany = record.chargeCompany
|
||||
|
||||
Reference in New Issue
Block a user