普通项目管理
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts :selected-company="selectedCompany"
|
||||
:initf-contacts="selectedContact"
|
||||
placeholder="请选择联系人"
|
||||
v-decorator="['contactsId',validatorRules.contactsId]"
|
||||
:maxLength='50'
|
||||
@@ -68,6 +69,7 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts :selected-company="selectedCompany"
|
||||
:initf-contacts="selectedMailContact"
|
||||
placeholder="请选择邮寄联系人"
|
||||
v-decorator="['mailContactsId',validatorRules.mailContactsId]"
|
||||
:maxLength='50'
|
||||
@@ -239,7 +241,9 @@ export default {
|
||||
}
|
||||
},
|
||||
chargeWayType: null,
|
||||
selectedCompany: null,
|
||||
selectedCompany: null, // 当前选中的企业
|
||||
selectedContact: null, // 编辑时的联系人
|
||||
selectedMailContact: null, // 编辑时的邮寄联系人
|
||||
url: {
|
||||
add: '/project/payCommonProject/add',
|
||||
edit: '/project/payCommonProject/edit'
|
||||
@@ -251,16 +255,24 @@ export default {
|
||||
this.edit({})
|
||||
},
|
||||
edit(record) {
|
||||
console.log(record)
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyName
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
}
|
||||
console.log(record.chargeCompany)
|
||||
// 回显选中的企业
|
||||
this.selectedCompany = record.chargeCompany
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
if (this.model.id) {
|
||||
this.selectedContact = {
|
||||
id: this.model.contactsTemporaryId,
|
||||
name: this.model.contactsTemporaryName
|
||||
}
|
||||
this.selectedMailContact = {
|
||||
id: this.model.mailContactsTemporaryId,
|
||||
name: this.model.mailContactsTemporaryName
|
||||
}
|
||||
}
|
||||
this.chargeWayType = record.chargeWay
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -318,9 +330,7 @@ export default {
|
||||
* @param value
|
||||
*/
|
||||
companyChange(value) {
|
||||
console.log(1)
|
||||
this.selectedCompany = value
|
||||
console.log(this.model.contactsId, this.model.mailContactsId)
|
||||
this.model.contactsId = undefined
|
||||
this.model.mailContactsId = undefined
|
||||
this.$nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user