[update] 收入合同、eslint
This commit is contained in:
@@ -91,15 +91,16 @@ export default {
|
||||
* 获取联系人数据
|
||||
*/
|
||||
getContactsList() {
|
||||
if (this.selectedCompany && this.selectedCompany.hasOwnProperty('id')) {
|
||||
if (this.selectedCompany && this.selectedCompany.hasOwnProperty.call(this.selectedCompany, 'id')) {
|
||||
const params = {
|
||||
companyId: this.selectedCompany.id
|
||||
}
|
||||
getContactsByCompany(params).then(res => {
|
||||
this.contactsList = res.result
|
||||
if (this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||
if (this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
console.log(this.contactsList)
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -127,7 +128,7 @@ export default {
|
||||
)
|
||||
},
|
||||
handleDropdownOpen() {
|
||||
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
||||
this.contactsList.forEach((item, index) => {
|
||||
if (item.id === this.initContacts.id) {
|
||||
this.$emit('change', undefined)
|
||||
|
||||
@@ -116,13 +116,14 @@ export default {
|
||||
*/
|
||||
initInstallmentList(record) {
|
||||
// 判断是否为编辑
|
||||
if (record.installmentList && record.installmentList.length > 0) {
|
||||
this.installmentList = record.installmentList
|
||||
if (record && record.length > 0) {
|
||||
this.installmentList = record
|
||||
} else {
|
||||
record.installmentList = [this.defaultFormData]
|
||||
record = [this.defaultFormData]
|
||||
}
|
||||
this.model = Object({}, record)
|
||||
this.installmentList = record.installmentList
|
||||
let obj = {}
|
||||
obj.installmentList = record
|
||||
this.model = Object.assign({}, obj)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'installmentList'))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user