[update] 收入合同、eslint

This commit is contained in:
zhaoxiao
2021-09-06 16:52:32 +08:00
parent d7c478c6fc
commit 804fe3cafa
10 changed files with 638 additions and 279 deletions
+4 -3
View File
@@ -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)
+6 -5
View File
@@ -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'))
})